@sfdxy/mule-lint 1.18.0 → 1.19.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (245) hide show
  1. package/README.md +154 -150
  2. package/dist/bin/mule-lint-mcp.js.map +1 -1
  3. package/dist/bin/mule-lint.js +4 -3
  4. package/dist/bin/mule-lint.js.map +1 -1
  5. package/dist/package.json +26 -15
  6. package/dist/src/core/ComplexityCalculator.d.ts.map +1 -1
  7. package/dist/src/core/ComplexityCalculator.js.map +1 -1
  8. package/dist/src/core/FileScanner.d.ts.map +1 -1
  9. package/dist/src/core/FileScanner.js.map +1 -1
  10. package/dist/src/core/MetricsAggregator.d.ts.map +1 -1
  11. package/dist/src/core/MetricsAggregator.js.map +1 -1
  12. package/dist/src/core/MetricsCollector.d.ts.map +1 -1
  13. package/dist/src/core/MetricsCollector.js +1 -2
  14. package/dist/src/core/MetricsCollector.js.map +1 -1
  15. package/dist/src/core/QualityGateEvaluator.d.ts.map +1 -1
  16. package/dist/src/core/QualityGateEvaluator.js.map +1 -1
  17. package/dist/src/core/XPathHelper.d.ts +9 -1
  18. package/dist/src/core/XPathHelper.d.ts.map +1 -1
  19. package/dist/src/core/XPathHelper.js +4 -9
  20. package/dist/src/core/XPathHelper.js.map +1 -1
  21. package/dist/src/core/XmlParser.d.ts.map +1 -1
  22. package/dist/src/core/XmlParser.js.map +1 -1
  23. package/dist/src/core/YamlParser.d.ts.map +1 -1
  24. package/dist/src/core/YamlParser.js.map +1 -1
  25. package/dist/src/core/errors.js.map +1 -1
  26. package/dist/src/engine/LintEngine.d.ts.map +1 -1
  27. package/dist/src/engine/LintEngine.js +2 -4
  28. package/dist/src/engine/LintEngine.js.map +1 -1
  29. package/dist/src/formatter/MuleXmlFormatter.d.ts.map +1 -1
  30. package/dist/src/formatter/MuleXmlFormatter.js +7 -1
  31. package/dist/src/formatter/MuleXmlFormatter.js.map +1 -1
  32. package/dist/src/formatter/index.d.ts +2 -2
  33. package/dist/src/formatter/index.d.ts.map +1 -1
  34. package/dist/src/formatter/index.js.map +1 -1
  35. package/dist/src/formatters/CsvFormatter.js.map +1 -1
  36. package/dist/src/formatters/HtmlFormatter.js +0 -1
  37. package/dist/src/formatters/HtmlFormatter.js.map +1 -1
  38. package/dist/src/formatters/JsonFormatter.d.ts.map +1 -1
  39. package/dist/src/formatters/JsonFormatter.js.map +1 -1
  40. package/dist/src/formatters/SarifFormatter.js.map +1 -1
  41. package/dist/src/formatters/TableFormatter.js.map +1 -1
  42. package/dist/src/formatters/html/components/Icons.js +1 -1
  43. package/dist/src/formatters/html/components/Icons.js.map +1 -1
  44. package/dist/src/formatters/html/components/MetricCard.d.ts.map +1 -1
  45. package/dist/src/formatters/html/components/MetricCard.js.map +1 -1
  46. package/dist/src/formatters/html/components/Modal.d.ts.map +1 -1
  47. package/dist/src/formatters/html/components/Modal.js.map +1 -1
  48. package/dist/src/formatters/html/components/RatingBadge.d.ts.map +1 -1
  49. package/dist/src/formatters/html/components/RatingBadge.js +6 -6
  50. package/dist/src/formatters/html/components/RatingBadge.js.map +1 -1
  51. package/dist/src/formatters/html/index.d.ts +2 -2
  52. package/dist/src/formatters/html/index.d.ts.map +1 -1
  53. package/dist/src/formatters/html/index.js.map +1 -1
  54. package/dist/src/formatters/html/scripts/charts.d.ts.map +1 -1
  55. package/dist/src/formatters/html/scripts/charts.js +45 -12
  56. package/dist/src/formatters/html/scripts/charts.js.map +1 -1
  57. package/dist/src/formatters/html/scripts/index.d.ts.map +1 -1
  58. package/dist/src/formatters/html/scripts/index.js.map +1 -1
  59. package/dist/src/formatters/html/scripts/renderer.d.ts.map +1 -1
  60. package/dist/src/formatters/html/scripts/renderer.js +175 -35
  61. package/dist/src/formatters/html/scripts/renderer.js.map +1 -1
  62. package/dist/src/formatters/html/sections/Header.d.ts.map +1 -1
  63. package/dist/src/formatters/html/sections/Header.js.map +1 -1
  64. package/dist/src/formatters/html/sections/LintSummary.d.ts.map +1 -1
  65. package/dist/src/formatters/html/sections/LintSummary.js.map +1 -1
  66. package/dist/src/formatters/html/sections/QualityRatings.js.map +1 -1
  67. package/dist/src/formatters/html/sections/Sidebar.d.ts.map +1 -1
  68. package/dist/src/formatters/html/sections/Sidebar.js.map +1 -1
  69. package/dist/src/formatters/html/styles/badges.d.ts.map +1 -1
  70. package/dist/src/formatters/html/styles/badges.js.map +1 -1
  71. package/dist/src/formatters/html/styles/index.d.ts.map +1 -1
  72. package/dist/src/formatters/html/styles/index.js.map +1 -1
  73. package/dist/src/formatters/html/theme.js.map +1 -1
  74. package/dist/src/formatters/html/views/Dashboard.js +5 -5
  75. package/dist/src/formatters/html/views/Dashboard.js.map +1 -1
  76. package/dist/src/formatters/html/views/IssuesView.d.ts.map +1 -1
  77. package/dist/src/formatters/html/views/IssuesView.js.map +1 -1
  78. package/dist/src/formatters/index.js.map +1 -1
  79. package/dist/src/mcp/index.d.ts.map +1 -1
  80. package/dist/src/mcp/index.js +12 -511
  81. package/dist/src/mcp/index.js.map +1 -1
  82. package/dist/src/mcp/prompts/index.d.ts +6 -0
  83. package/dist/src/mcp/prompts/index.d.ts.map +1 -0
  84. package/dist/src/mcp/prompts/index.js +87 -0
  85. package/dist/src/mcp/prompts/index.js.map +1 -0
  86. package/dist/src/mcp/resources/index.d.ts +6 -0
  87. package/dist/src/mcp/resources/index.d.ts.map +1 -0
  88. package/dist/src/mcp/resources/index.js +189 -0
  89. package/dist/src/mcp/resources/index.js.map +1 -0
  90. package/dist/src/mcp/tools/formatMuleXml.d.ts +6 -0
  91. package/dist/src/mcp/tools/formatMuleXml.d.ts.map +1 -0
  92. package/dist/src/mcp/tools/formatMuleXml.js +133 -0
  93. package/dist/src/mcp/tools/formatMuleXml.js.map +1 -0
  94. package/dist/src/mcp/tools/getRuleDetails.d.ts +6 -0
  95. package/dist/src/mcp/tools/getRuleDetails.d.ts.map +1 -0
  96. package/dist/src/mcp/tools/getRuleDetails.js +44 -0
  97. package/dist/src/mcp/tools/getRuleDetails.js.map +1 -0
  98. package/dist/src/mcp/tools/runLintAnalysis.d.ts +7 -0
  99. package/dist/src/mcp/tools/runLintAnalysis.d.ts.map +1 -0
  100. package/dist/src/mcp/tools/runLintAnalysis.js +76 -0
  101. package/dist/src/mcp/tools/runLintAnalysis.js.map +1 -0
  102. package/dist/src/mcp/tools/validateSnippet.d.ts +6 -0
  103. package/dist/src/mcp/tools/validateSnippet.d.ts.map +1 -0
  104. package/dist/src/mcp/tools/validateSnippet.js +59 -0
  105. package/dist/src/mcp/tools/validateSnippet.js.map +1 -0
  106. package/dist/src/quality/calculator.d.ts.map +1 -1
  107. package/dist/src/quality/calculator.js +1 -1
  108. package/dist/src/quality/calculator.js.map +1 -1
  109. package/dist/src/quality/index.d.ts.map +1 -1
  110. package/dist/src/quality/index.js.map +1 -1
  111. package/dist/src/quality/thresholds.js.map +1 -1
  112. package/dist/src/quality/types.d.ts.map +1 -1
  113. package/dist/src/rules/api-led/ApiLedRules.d.ts.map +1 -1
  114. package/dist/src/rules/api-led/ApiLedRules.js +6 -2
  115. package/dist/src/rules/api-led/ApiLedRules.js.map +1 -1
  116. package/dist/src/rules/api-led/SingleSystemSapiRule.d.ts.map +1 -1
  117. package/dist/src/rules/api-led/SingleSystemSapiRule.js.map +1 -1
  118. package/dist/src/rules/base/BaseRule.d.ts.map +1 -1
  119. package/dist/src/rules/base/BaseRule.js.map +1 -1
  120. package/dist/src/rules/base/ProjectRule.d.ts.map +1 -1
  121. package/dist/src/rules/base/ProjectRule.js.map +1 -1
  122. package/dist/src/rules/complexity/FlowComplexityRule.d.ts.map +1 -1
  123. package/dist/src/rules/complexity/FlowComplexityRule.js.map +1 -1
  124. package/dist/src/rules/dataweave/DataWeaveRules.d.ts.map +1 -1
  125. package/dist/src/rules/dataweave/DataWeaveRules.js +1 -3
  126. package/dist/src/rules/dataweave/DataWeaveRules.js.map +1 -1
  127. package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.d.ts.map +1 -1
  128. package/dist/src/rules/dataweave/Java17DWErrorHandlingRule.js.map +1 -1
  129. package/dist/src/rules/documentation/DisplayNameRule.d.ts.map +1 -1
  130. package/dist/src/rules/documentation/DisplayNameRule.js.map +1 -1
  131. package/dist/src/rules/documentation/FlowDescriptionRule.d.ts.map +1 -1
  132. package/dist/src/rules/documentation/FlowDescriptionRule.js.map +1 -1
  133. package/dist/src/rules/documentation/MissingDocNameRule.d.ts.map +1 -1
  134. package/dist/src/rules/documentation/MissingDocNameRule.js.map +1 -1
  135. package/dist/src/rules/error-handling/CorrelationIdRule.d.ts.map +1 -1
  136. package/dist/src/rules/error-handling/CorrelationIdRule.js.map +1 -1
  137. package/dist/src/rules/error-handling/GenericErrorRule.d.ts.map +1 -1
  138. package/dist/src/rules/error-handling/GenericErrorRule.js.map +1 -1
  139. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts.map +1 -1
  140. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js.map +1 -1
  141. package/dist/src/rules/error-handling/HttpStatusRule.d.ts.map +1 -1
  142. package/dist/src/rules/error-handling/HttpStatusRule.js.map +1 -1
  143. package/dist/src/rules/error-handling/MissingErrorHandlerRule.d.ts.map +1 -1
  144. package/dist/src/rules/error-handling/MissingErrorHandlerRule.js.map +1 -1
  145. package/dist/src/rules/error-handling/TryScopeRule.d.ts.map +1 -1
  146. package/dist/src/rules/error-handling/TryScopeRule.js.map +1 -1
  147. package/dist/src/rules/experimental/ExperimentalRules.d.ts.map +1 -1
  148. package/dist/src/rules/experimental/ExperimentalRules.js +6 -2
  149. package/dist/src/rules/experimental/ExperimentalRules.js.map +1 -1
  150. package/dist/src/rules/governance/GovernanceRules.d.ts +2 -2
  151. package/dist/src/rules/governance/GovernanceRules.d.ts.map +1 -1
  152. package/dist/src/rules/governance/GovernanceRules.js +2 -2
  153. package/dist/src/rules/governance/GovernanceRules.js.map +1 -1
  154. package/dist/src/rules/http/HttpContentTypeRule.d.ts.map +1 -1
  155. package/dist/src/rules/http/HttpContentTypeRule.js.map +1 -1
  156. package/dist/src/rules/http/HttpTimeoutRule.d.ts.map +1 -1
  157. package/dist/src/rules/http/HttpTimeoutRule.js.map +1 -1
  158. package/dist/src/rules/http/HttpUserAgentRule.d.ts.map +1 -1
  159. package/dist/src/rules/http/HttpUserAgentRule.js.map +1 -1
  160. package/dist/src/rules/index.js.map +1 -1
  161. package/dist/src/rules/logging/ExcessiveLoggersRule.d.ts.map +1 -1
  162. package/dist/src/rules/logging/ExcessiveLoggersRule.js.map +1 -1
  163. package/dist/src/rules/logging/LoggerCategoryRule.d.ts.map +1 -1
  164. package/dist/src/rules/logging/LoggerCategoryRule.js.map +1 -1
  165. package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.d.ts.map +1 -1
  166. package/dist/src/rules/logging/LoggerInUntilSuccessfulRule.js.map +1 -1
  167. package/dist/src/rules/logging/LoggerPayloadRule.d.ts.map +1 -1
  168. package/dist/src/rules/logging/LoggerPayloadRule.js.map +1 -1
  169. package/dist/src/rules/logging/NewLoggingRules.d.ts.map +1 -1
  170. package/dist/src/rules/logging/NewLoggingRules.js.map +1 -1
  171. package/dist/src/rules/naming/FlowCasingRule.d.ts.map +1 -1
  172. package/dist/src/rules/naming/FlowCasingRule.js.map +1 -1
  173. package/dist/src/rules/naming/FlowNamingRule.d.ts.map +1 -1
  174. package/dist/src/rules/naming/FlowNamingRule.js +3 -1
  175. package/dist/src/rules/naming/FlowNamingRule.js.map +1 -1
  176. package/dist/src/rules/naming/VariableNamingRule.d.ts.map +1 -1
  177. package/dist/src/rules/naming/VariableNamingRule.js.map +1 -1
  178. package/dist/src/rules/operations/CommentedCodeRule.d.ts.map +1 -1
  179. package/dist/src/rules/operations/CommentedCodeRule.js.map +1 -1
  180. package/dist/src/rules/operations/UnusedFlowRule.d.ts.map +1 -1
  181. package/dist/src/rules/operations/UnusedFlowRule.js.map +1 -1
  182. package/dist/src/rules/performance/AsyncErrorHandlerRule.d.ts.map +1 -1
  183. package/dist/src/rules/performance/AsyncErrorHandlerRule.js.map +1 -1
  184. package/dist/src/rules/performance/ConnectionPoolingRule.d.ts.map +1 -1
  185. package/dist/src/rules/performance/ConnectionPoolingRule.js.map +1 -1
  186. package/dist/src/rules/performance/LargeChoiceBlockRule.d.ts.map +1 -1
  187. package/dist/src/rules/performance/LargeChoiceBlockRule.js.map +1 -1
  188. package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts.map +1 -1
  189. package/dist/src/rules/performance/ReconnectionStrategyRule.js.map +1 -1
  190. package/dist/src/rules/performance/ScatterGatherRoutesRule.d.ts.map +1 -1
  191. package/dist/src/rules/performance/ScatterGatherRoutesRule.js.map +1 -1
  192. package/dist/src/rules/security/EncryptionKeyInLogsRule.d.ts.map +1 -1
  193. package/dist/src/rules/security/EncryptionKeyInLogsRule.js.map +1 -1
  194. package/dist/src/rules/security/HardcodedCredentialsRule.d.ts.map +1 -1
  195. package/dist/src/rules/security/HardcodedCredentialsRule.js.map +1 -1
  196. package/dist/src/rules/security/HardcodedHttpRule.d.ts.map +1 -1
  197. package/dist/src/rules/security/HardcodedHttpRule.js +1 -9
  198. package/dist/src/rules/security/HardcodedHttpRule.js.map +1 -1
  199. package/dist/src/rules/security/InputValidationRule.d.ts.map +1 -1
  200. package/dist/src/rules/security/InputValidationRule.js +1 -3
  201. package/dist/src/rules/security/InputValidationRule.js.map +1 -1
  202. package/dist/src/rules/security/InsecureTlsRule.d.ts.map +1 -1
  203. package/dist/src/rules/security/InsecureTlsRule.js.map +1 -1
  204. package/dist/src/rules/security/RateLimitingRule.d.ts.map +1 -1
  205. package/dist/src/rules/security/RateLimitingRule.js.map +1 -1
  206. package/dist/src/rules/security/TlsVersionRule.d.ts.map +1 -1
  207. package/dist/src/rules/security/TlsVersionRule.js.map +1 -1
  208. package/dist/src/rules/standards/ApiKitValidationRule.d.ts.map +1 -1
  209. package/dist/src/rules/standards/ApiKitValidationRule.js.map +1 -1
  210. package/dist/src/rules/standards/AutoDiscoveryRule.d.ts.map +1 -1
  211. package/dist/src/rules/standards/AutoDiscoveryRule.js.map +1 -1
  212. package/dist/src/rules/standards/ChoiceAntiPatternRule.d.ts.map +1 -1
  213. package/dist/src/rules/standards/ChoiceAntiPatternRule.js.map +1 -1
  214. package/dist/src/rules/standards/CronExternalizedRule.d.ts.map +1 -1
  215. package/dist/src/rules/standards/CronExternalizedRule.js.map +1 -1
  216. package/dist/src/rules/standards/DeprecatedComponentRule.d.ts.map +1 -1
  217. package/dist/src/rules/standards/DeprecatedComponentRule.js.map +1 -1
  218. package/dist/src/rules/standards/DwlStandardsRule.d.ts.map +1 -1
  219. package/dist/src/rules/standards/DwlStandardsRule.js.map +1 -1
  220. package/dist/src/rules/standards/HttpPortPlaceholderRule.d.ts.map +1 -1
  221. package/dist/src/rules/standards/HttpPortPlaceholderRule.js.map +1 -1
  222. package/dist/src/rules/structure/StructureRules.d.ts.map +1 -1
  223. package/dist/src/rules/structure/StructureRules.js.map +1 -1
  224. package/dist/src/rules/yaml/YamlRules.d.ts.map +1 -1
  225. package/dist/src/rules/yaml/YamlRules.js +2 -7
  226. package/dist/src/rules/yaml/YamlRules.js.map +1 -1
  227. package/dist/src/types/Config.d.ts.map +1 -1
  228. package/dist/src/types/Config.js.map +1 -1
  229. package/dist/src/types/QualityGate.d.ts.map +1 -1
  230. package/dist/src/types/QualityGate.js.map +1 -1
  231. package/dist/src/types/Report.d.ts.map +1 -1
  232. package/dist/src/types/Rule.d.ts +1 -1
  233. package/dist/src/types/Rule.d.ts.map +1 -1
  234. package/docs/README.md +27 -27
  235. package/docs/best-practices/documentation-standards.md +20 -11
  236. package/docs/best-practices/folder-structure.md +16 -10
  237. package/docs/best-practices/mulesoft-best-practices.md +96 -94
  238. package/docs/best-practices/rules-catalog.md +316 -287
  239. package/docs/linter/architecture.md +70 -64
  240. package/docs/linter/extending.md +137 -128
  241. package/docs/linter/folder-structure.md +39 -38
  242. package/docs/linter/naming-conventions.md +80 -78
  243. package/docs/linter/rule-engine.md +306 -306
  244. package/docs/mcp-design.md +35 -21
  245. package/package.json +84 -73
package/README.md CHANGED
@@ -33,19 +33,19 @@ flowchart TB
33
33
  subgraph CLI["CLI Layer"]
34
34
  A[npx @sfdxy/mule-lint command]
35
35
  end
36
-
36
+
37
37
  subgraph Engine["LintEngine"]
38
38
  B[FileScanner] --> C[XmlParser]
39
39
  C --> D[Rule Executor]
40
40
  end
41
-
41
+
42
42
  subgraph Rules["Rules - Strategy Pattern"]
43
43
  D --> E[MULE-001]
44
44
  D --> F[MULE-002]
45
45
  D --> G[...]
46
46
  D --> H[MULE-010]
47
47
  end
48
-
48
+
49
49
  subgraph Output["Formatters"]
50
50
  I[Table]
51
51
  J[JSON]
@@ -53,13 +53,13 @@ flowchart TB
53
53
  L[HTML Dashboard]
54
54
  M[CSV]
55
55
  end
56
-
56
+
57
57
  subgraph HTMLStack["HTML Report Stack"]
58
58
  L --> N[Tailwind CSS]
59
59
  L --> O[Chart.js]
60
60
  L --> P[Tabulator]
61
61
  end
62
-
62
+
63
63
  A --> B
64
64
  D --> I
65
65
  D --> J
@@ -79,7 +79,6 @@ flowchart LR
79
79
  E --> F["Table / JSON / SARIF / HTML / CSV"]
80
80
  ```
81
81
 
82
-
83
82
  ---
84
83
 
85
84
  ## Installation
@@ -118,16 +117,16 @@ npx @sfdxy/mule-lint ./src/main/mule --fail-on-warning
118
117
 
119
118
  ### CLI Options
120
119
 
121
- | Option | Description |
122
- |--------|-------------|
123
- | `-f, --format <type>` | Output format: `table`, `json`, `sarif`, `html`, `csv` (default: `table`) |
124
- | `-o, --output <file>` | Write output to file instead of stdout |
125
- | `-c, --config <file>` | Path to configuration file |
126
- | `-q, --quiet` | Show only errors (suppress warnings and info) |
127
- | `-e, --experimental` | **Enable experimental rules (opt-in)** |
128
- | `-g, --quality-gate <name>` | Apply quality gate: `default`, `strict`, or `config` |
129
- | `--fail-on-warning` | Exit with error code if warnings found |
130
- | `-v, --verbose` | Show verbose output |
120
+ | Option | Description |
121
+ | --------------------------- | ------------------------------------------------------------------------- |
122
+ | `-f, --format <type>` | Output format: `table`, `json`, `sarif`, `html`, `csv` (default: `table`) |
123
+ | `-o, --output <file>` | Write output to file instead of stdout |
124
+ | `-c, --config <file>` | Path to configuration file |
125
+ | `-q, --quiet` | Show only errors (suppress warnings and info) |
126
+ | `-e, --experimental` | **Enable experimental rules (opt-in)** |
127
+ | `-g, --quality-gate <name>` | Apply quality gate: `default`, `strict`, or `config` |
128
+ | `--fail-on-warning` | Exit with error code if warnings found |
129
+ | `-v, --verbose` | Show verbose output |
131
130
 
132
131
  ---
133
132
 
@@ -137,10 +136,10 @@ Quality gates provide pass/fail thresholds for your CI/CD pipelines. When a gate
137
136
 
138
137
  ### Built-in Gates
139
138
 
140
- | Gate | Description |
141
- |------|-------------|
139
+ | Gate | Description |
140
+ | --------- | ----------------------------------------------------------------------------- |
142
141
  | `default` | Fails if errors > 0, warnings > 10, complexity > 20, or security hotspots > 0 |
143
- | `strict` | Fails if any errors, warnings > 0, or complexity > 10 |
142
+ | `strict` | Fails if any errors, warnings > 0, or complexity > 10 |
144
143
 
145
144
  ### Usage
146
145
 
@@ -148,7 +147,7 @@ Quality gates provide pass/fail thresholds for your CI/CD pipelines. When a gate
148
147
  # Apply default quality gate
149
148
  npx @sfdxy/mule-lint ./src/main/mule -g default
150
149
 
151
- # Apply strict quality gate
150
+ # Apply strict quality gate
152
151
  npx @sfdxy/mule-lint ./src/main/mule -g strict
153
152
 
154
153
  # Use custom gate from config
@@ -181,40 +180,43 @@ The HTML report displays quality ratings for four key dimensions. These follow i
181
180
  **What it measures:** Average cyclomatic complexity across all flows.
182
181
 
183
182
  **Calculation:**
183
+
184
184
  - Count decision points per flow: `choice/when`, `foreach`, `try`, `scatter-gather`, `async`, `until-successful`, `error-handlers`
185
185
  - Base complexity = 1 + (total decision points)
186
186
  - **Rating = Average of all flow complexities**
187
187
 
188
- | Rating | Threshold | Interpretation |
189
- |--------|-----------|----------------|
190
- | **A** | Avg ≤ 5 | Simple, easy to test |
191
- | **B** | Avg ≤ 10 | Moderate complexity |
192
- | **C** | Avg ≤ 15 | Complex, consider splitting |
193
- | **D** | Avg ≤ 20 | High complexity, refactor recommended |
194
- | **E** | Avg > 20 | Very complex, critical refactoring needed |
188
+ | Rating | Threshold | Interpretation |
189
+ | ------ | --------- | ----------------------------------------- |
190
+ | **A** | Avg ≤ 5 | Simple, easy to test |
191
+ | **B** | Avg ≤ 10 | Moderate complexity |
192
+ | **C** | Avg ≤ 15 | Complex, consider splitting |
193
+ | **D** | Avg ≤ 20 | High complexity, refactor recommended |
194
+ | **E** | Avg > 20 | Very complex, critical refactoring needed |
195
195
 
196
196
  #### Maintainability Rating
197
197
 
198
198
  **What it measures:** Technical debt as a percentage of estimated development time.
199
199
 
200
200
  **Calculation:**
201
+
201
202
  - Debt minutes = (code smells × 5min) + (bugs × 15min) + (vulnerabilities × 30min)
202
203
  - Development estimate = (flows × 10min) + (subflows × 5min), minimum 60min
203
204
  - **Debt Ratio = (Debt minutes / Development estimate) × 100%**
204
205
 
205
- | Rating | Debt Ratio | Interpretation |
206
- |--------|-----------|----------------|
207
- | **A** | ≤ 5% | Excellent maintainability |
208
- | **B** | ≤ 10% | Good maintainability |
209
- | **C** | ≤ 20% | Moderate technical debt |
210
- | **D** | ≤ 50% | High debt, plan remediation |
211
- | **E** | > 50% | Critical debt, immediate action needed |
206
+ | Rating | Debt Ratio | Interpretation |
207
+ | ------ | ---------- | -------------------------------------- |
208
+ | **A** | ≤ 5% | Excellent maintainability |
209
+ | **B** | ≤ 10% | Good maintainability |
210
+ | **C** | ≤ 20% | Moderate technical debt |
211
+ | **D** | ≤ 50% | High debt, plan remediation |
212
+ | **E** | > 50% | Critical debt, immediate action needed |
212
213
 
213
214
  #### Reliability Rating
214
215
 
215
216
  **What it measures:** Number of bug-type issues detected.
216
217
 
217
218
  **Bug-type rules:** All `error-handling` category rules are classified as bugs, including:
219
+
218
220
  - Missing error handlers (MULE-003)
219
221
  - Missing correlation ID (MULE-007)
220
222
  - Generic error handling (MULE-009)
@@ -222,19 +224,20 @@ The HTML report displays quality ratings for four key dimensions. These follow i
222
224
  - Global error handler (MULE-001)
223
225
  - Try scope usage (ERR-001)
224
226
 
225
- | Rating | Bug Count | Interpretation |
226
- |--------|-----------|----------------|
227
- | **A** | 0 bugs | No reliability issues |
228
- | **B** | 1-2 bugs | Minor reliability concerns |
229
- | **C** | 3-5 bugs | Moderate reliability risk |
230
- | **D** | 6-10 bugs | High reliability risk |
231
- | **E** | > 10 bugs | Critical reliability issues |
227
+ | Rating | Bug Count | Interpretation |
228
+ | ------ | --------- | --------------------------- |
229
+ | **A** | 0 bugs | No reliability issues |
230
+ | **B** | 1-2 bugs | Minor reliability concerns |
231
+ | **C** | 3-5 bugs | Moderate reliability risk |
232
+ | **D** | 6-10 bugs | High reliability risk |
233
+ | **E** | > 10 bugs | Critical reliability issues |
232
234
 
233
235
  #### Security Rating
234
236
 
235
237
  **What it measures:** Vulnerability and security hotspot count.
236
238
 
237
239
  **Vulnerability rules:** All `security` category rules are classified as vulnerabilities, including:
240
+
238
241
  - Hardcoded credentials (MULE-201)
239
242
  - Insecure TLS (MULE-202)
240
243
  - Plaintext secrets (YAML-004)
@@ -243,13 +246,13 @@ The HTML report displays quality ratings for four key dimensions. These follow i
243
246
  - Rate limiting (SEC-003)
244
247
  - Input validation (SEC-004)
245
248
 
246
- | Rating | Vulnerabilities | Interpretation |
247
- |--------|-----------------|----------------|
248
- | **A** | 0 vulns | Secure configuration |
249
- | **B** | 1 vuln | Minor security finding |
250
- | **C** | 2-3 vulns | Security review needed |
251
- | **D** | 4-5 vulns | Security remediation required |
252
- | **E** | > 5 vulns | Critical security issues |
249
+ | Rating | Vulnerabilities | Interpretation |
250
+ | ------ | --------------- | ----------------------------- |
251
+ | **A** | 0 vulns | Secure configuration |
252
+ | **B** | 1 vuln | Minor security finding |
253
+ | **C** | 2-3 vulns | Security review needed |
254
+ | **D** | 4-5 vulns | Security remediation required |
255
+ | **E** | > 5 vulns | Critical security issues |
253
256
 
254
257
  ### Examples
255
258
 
@@ -270,106 +273,105 @@ npx @sfdxy/mule-lint src/main/mule -f sarif -o results.sarif
270
273
 
271
274
  ### Core Rules (MVP)
272
275
 
273
- | ID | Name | Severity | Category | Description |
274
- |----|------|----------|----------|-------------|
275
- | MULE-001 | Global Error Handler | Error | Error Handling | Project should have global error handler |
276
- | MULE-002 | Flow Naming | Warning | Naming | Flows end with `-flow`, sub-flows with `-subflow` |
277
- | MULE-003 | Missing Error Handler | Error | Error Handling | Flows should have error handlers |
278
- | MULE-004 | Hardcoded URLs | Error | Security | Use property placeholders for URLs |
279
- | MULE-005 | HTTP Status Check | Warning | Error Handling | Error handlers should set httpStatus |
280
- | MULE-006 | Logger Category | Warning | Logging | Loggers should have category attribute |
281
- | MULE-007 | Correlation ID | Warning | Error Handling | Error handlers should reference correlationId |
282
- | MULE-008 | Choice Anti-Pattern | Warning | Standards | Avoid raise-error in otherwise |
283
- | MULE-009 | Generic Error Type | Warning | Error Handling | Avoid catching type="ANY" |
284
- | MULE-010 | DWL Standards | Info | Standards | Standard DataWeave files should exist |
276
+ | ID | Name | Severity | Category | Description |
277
+ | -------- | --------------------- | -------- | -------------- | ------------------------------------------------- |
278
+ | MULE-001 | Global Error Handler | Error | Error Handling | Project should have global error handler |
279
+ | MULE-002 | Flow Naming | Warning | Naming | Flows end with `-flow`, sub-flows with `-subflow` |
280
+ | MULE-003 | Missing Error Handler | Error | Error Handling | Flows should have error handlers |
281
+ | MULE-004 | Hardcoded URLs | Error | Security | Use property placeholders for URLs |
282
+ | MULE-005 | HTTP Status Check | Warning | Error Handling | Error handlers should set httpStatus |
283
+ | MULE-006 | Logger Category | Warning | Logging | Loggers should have category attribute |
284
+ | MULE-007 | Correlation ID | Warning | Error Handling | Error handlers should reference correlationId |
285
+ | MULE-008 | Choice Anti-Pattern | Warning | Standards | Avoid raise-error in otherwise |
286
+ | MULE-009 | Generic Error Type | Warning | Error Handling | Avoid catching type="ANY" |
287
+ | MULE-010 | DWL Standards | Info | Standards | Standard DataWeave files should exist |
285
288
 
286
289
  ### Extended Rules
287
290
 
288
- | ID | Name | Severity | Category | Description |
289
- |----|------|----------|----------|-------------|
290
- | MULE-101 | Flow Casing | Warning | Naming | kebab-case for flows |
291
- | MULE-102 | Variable Naming | Warning | Naming | camelCase for variables |
292
- | MULE-201 | Hardcoded Credentials | Error | Security | Use `${secure::}` |
293
- | MULE-202 | Insecure TLS | Error | Security | No insecure="true" |
294
- | MULE-301 | Logger Payload | Warning | Logging | Don't log entire payload |
295
- | MULE-303 | Logger in Retry | Warning | Logging | Avoid loggers in until-successful |
296
- | MULE-401 | HTTP User-Agent | Warning | HTTP | Include User-Agent |
297
- | MULE-402 | HTTP Content-Type | Warning | HTTP | POST/PUT needs Content-Type |
298
- | MULE-403 | HTTP Timeout | Warning | HTTP | Set responseTimeout |
299
- | MULE-501 | Scatter-Gather | Info | Performance | Limit parallel routes |
300
- | MULE-502 | Async Error | Warning | Performance | Async needs error handling |
301
- | MULE-503 | Large Choice | Warning | Performance | Max 7 when clauses |
302
- | MULE-601 | Flow Description | Info | Documentation | Add doc:description |
303
- | MULE-604 | Missing doc:name | Warning | Documentation | Key components need doc:name |
304
- | MULE-701 | Deprecated | Warning | Standards | Detect deprecated elements |
305
- | MULE-801 | Flow Complexity | Warning | Complexity | Cyclomatic complexity threshold |
306
- | MULE-802 | Project Structure | Warning | Structure | Validate folder structure |
307
- | MULE-803 | Global Config | Warning | Structure | global.xml should exist |
308
- | MULE-804 | Monolithic XML | Warning | Structure | Split large XML files |
291
+ | ID | Name | Severity | Category | Description |
292
+ | -------- | --------------------- | -------- | ------------- | --------------------------------- |
293
+ | MULE-101 | Flow Casing | Warning | Naming | kebab-case for flows |
294
+ | MULE-102 | Variable Naming | Warning | Naming | camelCase for variables |
295
+ | MULE-201 | Hardcoded Credentials | Error | Security | Use `${secure::}` |
296
+ | MULE-202 | Insecure TLS | Error | Security | No insecure="true" |
297
+ | MULE-301 | Logger Payload | Warning | Logging | Don't log entire payload |
298
+ | MULE-303 | Logger in Retry | Warning | Logging | Avoid loggers in until-successful |
299
+ | MULE-401 | HTTP User-Agent | Warning | HTTP | Include User-Agent |
300
+ | MULE-402 | HTTP Content-Type | Warning | HTTP | POST/PUT needs Content-Type |
301
+ | MULE-403 | HTTP Timeout | Warning | HTTP | Set responseTimeout |
302
+ | MULE-501 | Scatter-Gather | Info | Performance | Limit parallel routes |
303
+ | MULE-502 | Async Error | Warning | Performance | Async needs error handling |
304
+ | MULE-503 | Large Choice | Warning | Performance | Max 7 when clauses |
305
+ | MULE-601 | Flow Description | Info | Documentation | Add doc:description |
306
+ | MULE-604 | Missing doc:name | Warning | Documentation | Key components need doc:name |
307
+ | MULE-701 | Deprecated | Warning | Standards | Detect deprecated elements |
308
+ | MULE-801 | Flow Complexity | Warning | Complexity | Cyclomatic complexity threshold |
309
+ | MULE-802 | Project Structure | Warning | Structure | Validate folder structure |
310
+ | MULE-803 | Global Config | Warning | Structure | global.xml should exist |
311
+ | MULE-804 | Monolithic XML | Warning | Structure | Split large XML files |
309
312
 
310
313
  ### DataWeave & API-Led Rules
311
314
 
312
- | ID | Name | Severity | Category | Description |
313
- |----|------|----------|----------|-------------|
314
- | DW-001 | External DWL | Warning | DataWeave | Externalize complex transforms |
315
- | DW-002 | DWL Naming | Info | DataWeave | kebab-case for .dwl files |
316
- | DW-003 | DWL Modules | Info | DataWeave | Use common modules |
317
- | DW-004 | Java 17 DW Errors | Error | DataWeave | Java 17 compatible error handling |
318
- | API-001 | Experience Layer | Info | API-Led | Experience API patterns |
319
- | API-002 | Process Layer | Info | API-Led | Process layer orchestration |
320
- | API-003 | System Layer | Info | API-Led | System layer connections |
321
- | API-004 | Single SAPI | Warning | API-Led | Single system per SAPI |
315
+ | ID | Name | Severity | Category | Description |
316
+ | ------- | ----------------- | -------- | --------- | --------------------------------- |
317
+ | DW-001 | External DWL | Warning | DataWeave | Externalize complex transforms |
318
+ | DW-002 | DWL Naming | Info | DataWeave | kebab-case for .dwl files |
319
+ | DW-003 | DWL Modules | Info | DataWeave | Use common modules |
320
+ | DW-004 | Java 17 DW Errors | Error | DataWeave | Java 17 compatible error handling |
321
+ | API-001 | Experience Layer | Info | API-Led | Experience API patterns |
322
+ | API-002 | Process Layer | Info | API-Led | Process layer orchestration |
323
+ | API-003 | System Layer | Info | API-Led | System layer connections |
324
+ | API-004 | Single SAPI | Warning | API-Led | Single system per SAPI |
322
325
 
323
326
  ### Experimental Rules
324
327
 
325
- | ID | Name | Severity | Category | Description |
326
- |----|------|----------|----------|-------------|
327
- | EXP-001 | Flow Ref Depth | Info | Experimental | Limit flow-ref chains |
328
- | EXP-002 | Config Naming | Info | Experimental | Connector config naming |
329
- | EXP-003 | MUnit Coverage | Info | Experimental | Check for MUnit tests |
330
- | YAML-001 | Env Files | Warning | Standards | Environment YAML files |
331
- | YAML-003 | Property Naming | Info | Standards | Property key format |
332
- | YAML-004 | Plaintext Secrets | Error | Security | Encrypt sensitive YAML properties |
328
+ | ID | Name | Severity | Category | Description |
329
+ | -------- | ----------------- | -------- | ------------ | --------------------------------- |
330
+ | EXP-001 | Flow Ref Depth | Info | Experimental | Limit flow-ref chains |
331
+ | EXP-002 | Config Naming | Info | Experimental | Connector config naming |
332
+ | EXP-003 | MUnit Coverage | Info | Experimental | Check for MUnit tests |
333
+ | YAML-001 | Env Files | Warning | Standards | Environment YAML files |
334
+ | YAML-003 | Property Naming | Info | Standards | Property key format |
335
+ | YAML-004 | Plaintext Secrets | Error | Security | Encrypt sensitive YAML properties |
333
336
 
334
337
  ### 2025-2026 Best Practices Rules (NEW)
335
338
 
336
- | ID | Name | Severity | Category | Description |
337
- |----|------|----------|----------|-------------|
338
- | SEC-002 | TLS Version | Error | Security | Detect deprecated TLS versions (< 1.2) |
339
- | SEC-003 | Rate Limiting | Warning | Security | APIs should have rate limiting configured |
340
- | SEC-004 | Input Validation | Warning | Security | Incoming payloads should be validated |
341
- | LOG-001 | Structured Logging | Info | Logging | Recommend JSON logger format |
342
- | LOG-004 | Sensitive Data Logging | Error | Logging | Detect PII/secrets in log statements |
343
- | ERR-001 | Try Scope | Info | Error Handling | Complex operations should use Try scope |
344
- | PERF-002 | Connection Pooling | Warning | Performance | DB/HTTP should configure connection pools |
339
+ | ID | Name | Severity | Category | Description |
340
+ | -------- | ---------------------- | -------- | -------------- | ----------------------------------------- |
341
+ | SEC-002 | TLS Version | Error | Security | Detect deprecated TLS versions (< 1.2) |
342
+ | SEC-003 | Rate Limiting | Warning | Security | APIs should have rate limiting configured |
343
+ | SEC-004 | Input Validation | Warning | Security | Incoming payloads should be validated |
344
+ | LOG-001 | Structured Logging | Info | Logging | Recommend JSON logger format |
345
+ | LOG-004 | Sensitive Data Logging | Error | Logging | Detect PII/secrets in log statements |
346
+ | ERR-001 | Try Scope | Info | Error Handling | Complex operations should use Try scope |
347
+ | PERF-002 | Connection Pooling | Warning | Performance | DB/HTTP should configure connection pools |
345
348
 
346
349
  ### Operations & Resilience Rules
347
350
 
348
- | ID | Name | Severity | Category | Description |
349
- |----|------|----------|----------|-------------|
350
- | RES-001 | Reconnection Strategy | Warning | Performance | Connectors should have reconnection strategies |
351
- | OPS-001 | Auto-Discovery | Info | Standards | APIs should have auto-discovery for API Manager |
352
- | OPS-002 | HTTP Port Placeholder | Warning | Standards | HTTP ports should use property placeholders |
353
- | OPS-003 | Externalized Cron | Warning | Standards | Cron expressions should use placeholders |
354
- | SEC-006 | Encryption Key in Logs | Error | Security | Detect sensitive data in log messages |
355
- | HYG-001 | Excessive Loggers | Warning | Logging | Flows should not have too many loggers |
356
- | HYG-002 | Commented Code | Info | Standards | Detect commented-out code blocks |
357
- | HYG-003 | Unused Flow | Warning | Standards | Detect flows/sub-flows never referenced |
358
- | API-005 | APIKit Validation | Info | Standards | APIs should use APIKit for interfaces |
359
- | DOC-001 | Display Name | Info | Documentation | Key components should have meaningful names |
351
+ | ID | Name | Severity | Category | Description |
352
+ | ------- | ---------------------- | -------- | ------------- | ----------------------------------------------- |
353
+ | RES-001 | Reconnection Strategy | Warning | Performance | Connectors should have reconnection strategies |
354
+ | OPS-001 | Auto-Discovery | Info | Standards | APIs should have auto-discovery for API Manager |
355
+ | OPS-002 | HTTP Port Placeholder | Warning | Standards | HTTP ports should use property placeholders |
356
+ | OPS-003 | Externalized Cron | Warning | Standards | Cron expressions should use placeholders |
357
+ | SEC-006 | Encryption Key in Logs | Error | Security | Detect sensitive data in log messages |
358
+ | HYG-001 | Excessive Loggers | Warning | Logging | Flows should not have too many loggers |
359
+ | HYG-002 | Commented Code | Info | Standards | Detect commented-out code blocks |
360
+ | HYG-003 | Unused Flow | Warning | Standards | Detect flows/sub-flows never referenced |
361
+ | API-005 | APIKit Validation | Info | Standards | APIs should use APIKit for interfaces |
362
+ | DOC-001 | Display Name | Info | Documentation | Key components should have meaningful names |
360
363
 
361
364
  ### Project Governance Rules
362
- | ID | Name | Severity | Category | Description |
363
- |----|------|----------|----------|-------------|
364
- | PROJ-001 | POM Validation | Error | Structure | Validates pom.xml existence and plugins |
365
- | PROJ-002 | Git Hygiene | Warning | Structure | Validates .gitignore existence and entries |
365
+
366
+ | ID | Name | Severity | Category | Description |
367
+ | -------- | -------------- | -------- | --------- | ------------------------------------------ |
368
+ | PROJ-001 | POM Validation | Error | Structure | Validates pom.xml existence and plugins |
369
+ | PROJ-002 | Git Hygiene | Warning | Structure | Validates .gitignore existence and entries |
366
370
 
367
371
  **Total: 56 rules** across 14 categories.
368
372
 
369
373
  See [Rules Catalog](docs/best-practices/rules-catalog.md) for detailed documentation.
370
374
 
371
-
372
-
373
375
  ---
374
376
 
375
377
  ## Output Formats
@@ -466,7 +468,7 @@ Create a `.mulelintrc.json` file in your project root:
466
468
  {
467
469
  "rules": {
468
470
  "MULE-001": { "enabled": true },
469
- "MULE-002": {
471
+ "MULE-002": {
470
472
  "enabled": true,
471
473
  "options": {
472
474
  "flowSuffix": "-flow",
@@ -474,7 +476,7 @@ Create a `.mulelintrc.json` file in your project root:
474
476
  "excludePatterns": ["*-api-main"]
475
477
  }
476
478
  },
477
- "MULE-006": {
479
+ "MULE-006": {
478
480
  "enabled": true,
479
481
  "severity": "error",
480
482
  "options": {
@@ -499,10 +501,10 @@ import { LintEngine, ALL_RULES, formatSarif } from '@sfdxy/mule-lint';
499
501
 
500
502
  // Create engine with all rules
501
503
  const engine = new LintEngine({
502
- rules: ALL_RULES,
503
- config: {
504
- include: ['src/main/mule/**/*.xml'],
505
- },
504
+ rules: ALL_RULES,
505
+ config: {
506
+ include: ['src/main/mule/**/*.xml'],
507
+ },
506
508
  });
507
509
 
508
510
  // Scan a project
@@ -520,6 +522,7 @@ const issues = engine.scanContent(xmlContent, 'file.xml');
520
522
  This tool exposes a **Model Context Protocol (MCP)** server, allowing AI agents (like Claude Desktop, IDE assistants) to directly interact with the linter to discover rules, scan projects, and explain violations.
521
523
 
522
524
  ### Features
525
+
523
526
  - **Tools**: `run_lint_analysis` (scan project), `get_rule_details` (explain rule), `validate_snippet` (check XML/DWL).
524
527
  - **Resources**: `mule-lint://rules` (list all available rules), `mule-lint://docs/{slug}` (best practices documentation).
525
528
  - **Prompts**: `analyze-project`, `explain-rule`, `fix-issue`.
@@ -568,17 +571,17 @@ See [Extending Guide](docs/linter/extending.md) for detailed instructions on cre
568
571
  import { BaseRule, ValidationContext, Issue } from '@sfdxy/mule-lint';
569
572
 
570
573
  export class MyCustomRule extends BaseRule {
571
- id = 'CUSTOM-001';
572
- name = 'My Custom Rule';
573
- description = 'Enforces my organization standards';
574
- severity = 'warning' as const;
575
- category = 'standards' as const;
576
-
577
- validate(doc: Document, context: ValidationContext): Issue[] {
578
- // Your validation logic using XPath
579
- const flows = this.select('//mule:flow', doc);
580
- // ...
581
- }
574
+ id = 'CUSTOM-001';
575
+ name = 'My Custom Rule';
576
+ description = 'Enforces my organization standards';
577
+ severity = 'warning' as const;
578
+ category = 'standards' as const;
579
+
580
+ validate(doc: Document, context: ValidationContext): Issue[] {
581
+ // Your validation logic using XPath
582
+ const flows = this.select('//mule:flow', doc);
583
+ // ...
584
+ }
582
585
  }
583
586
  ```
584
587
 
@@ -591,6 +594,7 @@ This project is inspired by and builds upon the ideas from:
591
594
  - **[mule-lint/mule-lint](https://github.com/mule-lint/mule-lint)** - The original Groovy-based MuleSoft linting tool with DSL-based rule definitions
592
595
 
593
596
  While the original project uses Groovy and a custom DSL, this TypeScript implementation was created to:
597
+
594
598
  - Enable easier VS Code extension integration
595
599
  - Provide better AI agent compatibility via SARIF output
596
600
  - Leverage the modern npm ecosystem
@@ -600,13 +604,13 @@ While the original project uses Groovy and a custom DSL, this TypeScript impleme
600
604
 
601
605
  ## Documentation
602
606
 
603
- | Document | Description |
604
- |----------|-------------|
605
- | [Architecture](docs/linter/architecture.md) | System design and data flow |
606
- | [Rules Catalog](docs/best-practices/rules-catalog.md) | Complete list of all rules |
607
+ | Document | Description |
608
+ | ---------------------------------------------------------------- | ------------------------------- |
609
+ | [Architecture](docs/linter/architecture.md) | System design and data flow |
610
+ | [Rules Catalog](docs/best-practices/rules-catalog.md) | Complete list of all rules |
607
611
  | [Best Practices](docs/best-practices/mulesoft-best-practices.md) | MuleSoft development guidelines |
608
- | [Extending](docs/linter/extending.md) | How to add custom rules |
609
- | [Naming Conventions](docs/linter/naming-conventions.md) | Code style guide |
612
+ | [Extending](docs/linter/extending.md) | How to add custom rules |
613
+ | [Naming Conventions](docs/linter/naming-conventions.md) | Code style guide |
610
614
 
611
615
  ---
612
616
 
@@ -651,4 +655,4 @@ Contributions are welcome! Please read the [Contributing Guide](CONTRIBUTING.md)
651
655
 
652
656
  ## License
653
657
 
654
- MIT © 2024
658
+ MIT © 2024
@@ -1 +1 @@
1
- {"version":3,"file":"mule-lint-mcp.js","sourceRoot":"","sources":["../../bin/mule-lint-mcp.ts"],"names":[],"mappings":";;;AACA,oCAA+C;AAE/C,KAAK,UAAU,IAAI;IACf,MAAM,MAAM,GAAG,IAAI,uBAAiB,EAAE,CAAC;IACvC,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;AACzB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACnB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;IACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AACpB,CAAC,CAAC,CAAC"}
1
+ {"version":3,"file":"mule-lint-mcp.js","sourceRoot":"","sources":["../../bin/mule-lint-mcp.ts"],"names":[],"mappings":";;;AACA,oCAA+C;AAE/C,KAAK,UAAU,IAAI;IACjB,MAAM,MAAM,GAAG,IAAI,uBAAiB,EAAE,CAAC;IACvC,MAAM,MAAM,CAAC,KAAK,EAAE,CAAC;AACvB,CAAC;AAED,IAAI,EAAE,CAAC,KAAK,CAAC,CAAC,KAAK,EAAE,EAAE;IACrB,OAAO,CAAC,KAAK,CAAC,4BAA4B,EAAE,KAAK,CAAC,CAAC;IACnD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC;AAClB,CAAC,CAAC,CAAC"}
@@ -42,11 +42,12 @@ const rules_1 = require("../src/rules");
42
42
  const formatters_1 = require("../src/formatters");
43
43
  const QualityGateEvaluator_1 = require("../src/core/QualityGateEvaluator");
44
44
  const QualityGate_1 = require("../src/types/QualityGate");
45
+ const packageJson = require('../package.json');
45
46
  const program = new commander_1.Command();
46
47
  program
47
48
  .name('mule-lint')
48
49
  .description('Static analysis tool for MuleSoft applications')
49
- .version('1.0.0')
50
+ .version(packageJson.version)
50
51
  .argument('[path]', 'Path to scan (directory or file)')
51
52
  .option('-f, --format <type>', 'Output format: table, json, sarif, html, csv', 'table')
52
53
  .option('-o, --output <file>', 'Write output to file instead of stdout')
@@ -117,7 +118,7 @@ async function runLint(targetPath, options) {
117
118
  // Filter rules based on keys (experimental is opt-in)
118
119
  const effectiveRules = options.experimental
119
120
  ? rules_1.ALL_RULES
120
- : rules_1.ALL_RULES.filter(rule => rule.category !== 'experimental');
121
+ : rules_1.ALL_RULES.filter((rule) => rule.category !== 'experimental');
121
122
  if (options.verbose) {
122
123
  console.log(`Loaded ${effectiveRules.length} rules (Experimental: ${options.experimental ? 'ON' : 'OFF'})`);
123
124
  }
@@ -132,7 +133,7 @@ async function runLint(targetPath, options) {
132
133
  // Filter if quiet mode
133
134
  if (options.quiet) {
134
135
  for (const file of report.files) {
135
- file.issues = file.issues.filter(issue => issue.severity === 'error');
136
+ file.issues = file.issues.filter((issue) => issue.severity === 'error');
136
137
  }
137
138
  report.summary.bySeverity.warning = 0;
138
139
  report.summary.bySeverity.info = 0;
@@ -1 +1 @@
1
- {"version":3,"file":"mule-lint.js","sourceRoot":"","sources":["../../bin/mule-lint.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAEA,yCAAoC;AACpC,uCAAyB;AACzB,2CAA6B;AAC7B,yDAAsD;AACtD,wCAAyC;AACzC,kDAAwD;AAExD,2EAI0C;AAC1C,0DAAkG;AAElG,MAAM,OAAO,GAAG,IAAI,mBAAO,EAAE,CAAC;AAE9B,OAAO;KACF,IAAI,CAAC,WAAW,CAAC;KACjB,WAAW,CAAC,gDAAgD,CAAC;KAC7D,OAAO,CAAC,OAAO,CAAC;KAChB,QAAQ,CAAC,QAAQ,EAAE,kCAAkC,CAAC;KACtD,MAAM,CAAC,qBAAqB,EAAE,8CAA8C,EAAE,OAAO,CAAC;KACtF,MAAM,CAAC,qBAAqB,EAAE,wCAAwC,CAAC;KACvE,MAAM,CAAC,qBAAqB,EAAE,4BAA4B,CAAC;KAC3D,MAAM,CAAC,aAAa,EAAE,+CAA+C,CAAC;KACtE,MAAM,CAAC,mBAAmB,EAAE,wCAAwC,CAAC;KACrE,MAAM,CAAC,oBAAoB,EAAE,oCAAoC,CAAC;KAClE,MAAM,CAAC,2BAA2B,EAAE,qDAAqD,CAAC;KAC1F,MAAM,CAAC,eAAe,EAAE,qBAAqB,CAAC;KAC9C,MAAM,CAAC,KAAK,EAAE,UAA8B,EAAE,OAAO,EAAE,EAAE;IACtD,IAAI,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