For the complete documentation index, see llms.txt. This page is also available as Markdown.

MuleSoft

Language-specific information about the way that SonarQube Cloud supports the analysis of MuleSoft.

Analysis overview

The MuleSoft analyzer analyzes Mule 4 applications. It examines Mule XML configuration files and DataWeave source code to provide code-quality and security insights.

Project detection

The analyzer identifies a Mule 4 application from its mule-artifact.json file.

For a standalone project, the file must be at the repository root:

repository/
└── mule-artifact.json

For a monorepo, the analyzer also searches the direct children of the repository root:

repository/
├── application-a/
│   └── mule-artifact.json
└── application-b/
    └── mule-artifact.json

If the artifact file is deeper in the repository structure, specify its path explicitly with the sonar.dre.mulesoft.muleArtifactPath property. For example:

sonar.dre.mulesoft.muleArtifactPath=path/to/mule-artifact.json

Embedded DataWeave in Mule XML

The analyzer examines embedded DataWeave code in the following Mule XML locations:

  • <set-variable> value attributes containing an expression (#[...]), for example:

  • <ee:set-variable> CDATA bodies, for example:

  • <set-payload> value attributes containing an expression (#[...]), for example:

  • <ee:set-payload> CDATA bodies, for example:

Note: Embedded DataWeave code in other Mule XML locations is not currently analyzed.

Mule configuration measures

For Mule XML configuration files, the analyzer computes these custom measures:

  • Mule configuration file count: number of Mule XML configuration files analyzed.

  • Mule DataWeave transformation count (<ee:transform>): number of DataWeave transformations in the analyzed Mule XML configuration files.

  • Mule flow count (<flow>): number of Mule flows in the analyzed Mule XML configuration files.

  • Mule sub-flow count (<sub-flow>): number of Mule sub-flows in the analyzed Mule XML configuration files.

  • Mule configuration complexity rating: computed by adding the number of flows and sub-flows together, then mapping the result as follows:

    • A (simple): total <= 7

    • B (medium): 7 < total <= 15

    • C (complex): total > 15

Language-specific properties

Discover and update the MuleSoft-specific properties in Your project > Administration > General Settings > Languages > MuleSoft. See Configuration overview for more information about setting properties.

Test coverage parameters

Last updated

Was this helpful?