Common recipes¶
Start each command in the Mule project root unless the recipe says otherwise.
Scan before committing¶
mule-lint . --profile recommended
This is the normal developer loop. Linting reads files and prints findings; it does not modify the project.
Focus on one file¶
mule-lint src/main/mule/orders-api.xml --profile recommended
Useful while editing, but project-wide and cross-file checks are more accurate when you pass ..
Show only errors¶
mule-lint . --profile recommended --quiet
Quiet mode reduces terminal noise. It does not change the rules that run.
Create an HTML report¶
mule-lint . --profile recommended --format html --output mule-lint-report.html
Open the generated file locally. New offline reports include charts, fonts and the issue table in the file; no browser network connection is needed. Older published versions may still generate CDN-dependent reports. Report data can contain source details, so review it before sharing.
Share findings in a spreadsheet¶
mule-lint . --profile recommended --format csv --output mule-lint-report.csv
Add a warning gate¶
mule-lint . --profile recommended --fail-on-warning
Profiles choose which rules run. --fail-on-warning changes when the command exits non-zero.
Use a team configuration¶
mule-lint . --config .mulelintrc.json
The CLI does not discover this file automatically. Always pass --config or -c.
Try strict rules without changing config¶
mule-lint . --profile strict
Strict includes stable opinionated conventions. Treat its first run as a review, not an automatic reason to rewrite working integrations.
Validate an API contract¶
mule-lint api validate src/main/resources/api
This validates RAML/OpenAPI. It is separate from Mule XML linting; see API contract validation.
Preview XML formatting¶
mule-lint format src/main/mule/orders-api.xml --check
Apply formatting only after reviewing the diff:
mule-lint format src/main/mule/orders-api.xml
See XML formatting for safe usage.
Run without installing globally¶
npx -y @sfdxy/mule-lint@2.0.0 . --profile recommended
Pinning the version makes results repeatable across developers and CI.