@sfdxy/mule-lint 1.20.0 → 1.21.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 (134) hide show
  1. package/README.md +63 -17
  2. package/dist/package.json +1 -1
  3. package/dist/src/core/XPathHelper.d.ts.map +1 -1
  4. package/dist/src/core/XPathHelper.js +8 -0
  5. package/dist/src/core/XPathHelper.js.map +1 -1
  6. package/dist/src/engine/LintEngine.d.ts +22 -0
  7. package/dist/src/engine/LintEngine.d.ts.map +1 -1
  8. package/dist/src/engine/LintEngine.js +105 -18
  9. package/dist/src/engine/LintEngine.js.map +1 -1
  10. package/dist/src/rules/api-led/ApikitConsoleProductionRule.d.ts +22 -0
  11. package/dist/src/rules/api-led/ApikitConsoleProductionRule.d.ts.map +1 -0
  12. package/dist/src/rules/api-led/ApikitConsoleProductionRule.js +43 -0
  13. package/dist/src/rules/api-led/ApikitConsoleProductionRule.js.map +1 -0
  14. package/dist/src/rules/api-led/ApikitMainFlowStructureRule.d.ts +24 -0
  15. package/dist/src/rules/api-led/ApikitMainFlowStructureRule.d.ts.map +1 -0
  16. package/dist/src/rules/api-led/ApikitMainFlowStructureRule.js +53 -0
  17. package/dist/src/rules/api-led/ApikitMainFlowStructureRule.js.map +1 -0
  18. package/dist/src/rules/api-led/ApikitStatusCodeVariableRule.d.ts +25 -0
  19. package/dist/src/rules/api-led/ApikitStatusCodeVariableRule.d.ts.map +1 -0
  20. package/dist/src/rules/api-led/ApikitStatusCodeVariableRule.js +59 -0
  21. package/dist/src/rules/api-led/ApikitStatusCodeVariableRule.js.map +1 -0
  22. package/dist/src/rules/connector/EventListenerNullGuardRule.d.ts +24 -0
  23. package/dist/src/rules/connector/EventListenerNullGuardRule.d.ts.map +1 -0
  24. package/dist/src/rules/connector/EventListenerNullGuardRule.js +58 -0
  25. package/dist/src/rules/connector/EventListenerNullGuardRule.js.map +1 -0
  26. package/dist/src/rules/connector/ReplayChannelConfigRule.d.ts +23 -0
  27. package/dist/src/rules/connector/ReplayChannelConfigRule.d.ts.map +1 -0
  28. package/dist/src/rules/connector/ReplayChannelConfigRule.js +52 -0
  29. package/dist/src/rules/connector/ReplayChannelConfigRule.js.map +1 -0
  30. package/dist/src/rules/dataweave/DataWeaveRules.d.ts +11 -4
  31. package/dist/src/rules/dataweave/DataWeaveRules.d.ts.map +1 -1
  32. package/dist/src/rules/dataweave/DataWeaveRules.js +20 -20
  33. package/dist/src/rules/dataweave/DataWeaveRules.js.map +1 -1
  34. package/dist/src/rules/dataweave/DuplicateTransformLogicRule.d.ts +25 -0
  35. package/dist/src/rules/dataweave/DuplicateTransformLogicRule.d.ts.map +1 -0
  36. package/dist/src/rules/dataweave/DuplicateTransformLogicRule.js +63 -0
  37. package/dist/src/rules/dataweave/DuplicateTransformLogicRule.js.map +1 -0
  38. package/dist/src/rules/error-handling/CatchAllLastRule.d.ts +24 -0
  39. package/dist/src/rules/error-handling/CatchAllLastRule.d.ts.map +1 -0
  40. package/dist/src/rules/error-handling/CatchAllLastRule.js +65 -0
  41. package/dist/src/rules/error-handling/CatchAllLastRule.js.map +1 -0
  42. package/dist/src/rules/error-handling/ErrorHandlerTypeCoverageRule.d.ts +28 -0
  43. package/dist/src/rules/error-handling/ErrorHandlerTypeCoverageRule.d.ts.map +1 -0
  44. package/dist/src/rules/error-handling/ErrorHandlerTypeCoverageRule.js +70 -0
  45. package/dist/src/rules/error-handling/ErrorHandlerTypeCoverageRule.js.map +1 -0
  46. package/dist/src/rules/error-handling/ErrorResponseStructureRule.d.ts +23 -0
  47. package/dist/src/rules/error-handling/ErrorResponseStructureRule.d.ts.map +1 -0
  48. package/dist/src/rules/error-handling/ErrorResponseStructureRule.js +73 -0
  49. package/dist/src/rules/error-handling/ErrorResponseStructureRule.js.map +1 -0
  50. package/dist/src/rules/error-handling/GenericErrorRule.d.ts +15 -3
  51. package/dist/src/rules/error-handling/GenericErrorRule.d.ts.map +1 -1
  52. package/dist/src/rules/error-handling/GenericErrorRule.js +58 -18
  53. package/dist/src/rules/error-handling/GenericErrorRule.js.map +1 -1
  54. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts +14 -15
  55. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.d.ts.map +1 -1
  56. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js +59 -38
  57. package/dist/src/rules/error-handling/GlobalErrorHandlerRule.js.map +1 -1
  58. package/dist/src/rules/error-handling/TryScopeRule.d.ts +5 -0
  59. package/dist/src/rules/error-handling/TryScopeRule.d.ts.map +1 -1
  60. package/dist/src/rules/error-handling/TryScopeRule.js +30 -7
  61. package/dist/src/rules/error-handling/TryScopeRule.js.map +1 -1
  62. package/dist/src/rules/http/ConnectionIdleTimeoutRule.d.ts +27 -0
  63. package/dist/src/rules/http/ConnectionIdleTimeoutRule.d.ts.map +1 -0
  64. package/dist/src/rules/http/ConnectionIdleTimeoutRule.js +46 -0
  65. package/dist/src/rules/http/ConnectionIdleTimeoutRule.js.map +1 -0
  66. package/dist/src/rules/index.d.ts +1 -1
  67. package/dist/src/rules/index.d.ts.map +1 -1
  68. package/dist/src/rules/index.js +50 -8
  69. package/dist/src/rules/index.js.map +1 -1
  70. package/dist/src/rules/logging/LoggerPayloadRule.d.ts +15 -0
  71. package/dist/src/rules/logging/LoggerPayloadRule.d.ts.map +1 -1
  72. package/dist/src/rules/logging/LoggerPayloadRule.js +48 -4
  73. package/dist/src/rules/logging/LoggerPayloadRule.js.map +1 -1
  74. package/dist/src/rules/operations/FlowRefTargetExistsRule.d.ts +23 -0
  75. package/dist/src/rules/operations/FlowRefTargetExistsRule.d.ts.map +1 -0
  76. package/dist/src/rules/operations/FlowRefTargetExistsRule.js +58 -0
  77. package/dist/src/rules/operations/FlowRefTargetExistsRule.js.map +1 -0
  78. package/dist/src/rules/operations/UnusedFlowRule.d.ts +20 -0
  79. package/dist/src/rules/operations/UnusedFlowRule.d.ts.map +1 -1
  80. package/dist/src/rules/operations/UnusedFlowRule.js +73 -7
  81. package/dist/src/rules/operations/UnusedFlowRule.js.map +1 -1
  82. package/dist/src/rules/operations/UnusedVariableRule.d.ts +31 -0
  83. package/dist/src/rules/operations/UnusedVariableRule.d.ts.map +1 -0
  84. package/dist/src/rules/operations/UnusedVariableRule.js +103 -0
  85. package/dist/src/rules/operations/UnusedVariableRule.js.map +1 -0
  86. package/dist/src/rules/performance/ListenerReconnectForeverRule.d.ts +28 -0
  87. package/dist/src/rules/performance/ListenerReconnectForeverRule.d.ts.map +1 -0
  88. package/dist/src/rules/performance/ListenerReconnectForeverRule.js +56 -0
  89. package/dist/src/rules/performance/ListenerReconnectForeverRule.js.map +1 -0
  90. package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts +7 -4
  91. package/dist/src/rules/performance/ReconnectionStrategyRule.d.ts.map +1 -1
  92. package/dist/src/rules/performance/ReconnectionStrategyRule.js +44 -24
  93. package/dist/src/rules/performance/ReconnectionStrategyRule.js.map +1 -1
  94. package/dist/src/rules/security/ConnectorCredentialsSecuredRule.d.ts +36 -0
  95. package/dist/src/rules/security/ConnectorCredentialsSecuredRule.d.ts.map +1 -0
  96. package/dist/src/rules/security/ConnectorCredentialsSecuredRule.js +124 -0
  97. package/dist/src/rules/security/ConnectorCredentialsSecuredRule.js.map +1 -0
  98. package/dist/src/rules/security/HardcodedCredentialsRule.d.ts +4 -0
  99. package/dist/src/rules/security/HardcodedCredentialsRule.d.ts.map +1 -1
  100. package/dist/src/rules/security/HardcodedCredentialsRule.js +15 -0
  101. package/dist/src/rules/security/HardcodedCredentialsRule.js.map +1 -1
  102. package/dist/src/rules/security/SecurePropertiesEncryptionRule.d.ts +25 -0
  103. package/dist/src/rules/security/SecurePropertiesEncryptionRule.d.ts.map +1 -0
  104. package/dist/src/rules/security/SecurePropertiesEncryptionRule.js +59 -0
  105. package/dist/src/rules/security/SecurePropertiesEncryptionRule.js.map +1 -0
  106. package/dist/src/rules/security/SecurePropertiesKeyRule.d.ts +23 -0
  107. package/dist/src/rules/security/SecurePropertiesKeyRule.d.ts.map +1 -0
  108. package/dist/src/rules/security/SecurePropertiesKeyRule.js +45 -0
  109. package/dist/src/rules/security/SecurePropertiesKeyRule.js.map +1 -0
  110. package/dist/src/rules/security/TlsKeystorePasswordRule.d.ts +25 -0
  111. package/dist/src/rules/security/TlsKeystorePasswordRule.d.ts.map +1 -0
  112. package/dist/src/rules/security/TlsKeystorePasswordRule.js +63 -0
  113. package/dist/src/rules/security/TlsKeystorePasswordRule.js.map +1 -0
  114. package/dist/src/rules/standards/ApikitRouteVariableConsistencyRule.d.ts +26 -0
  115. package/dist/src/rules/standards/ApikitRouteVariableConsistencyRule.d.ts.map +1 -0
  116. package/dist/src/rules/standards/ApikitRouteVariableConsistencyRule.js +61 -0
  117. package/dist/src/rules/standards/ApikitRouteVariableConsistencyRule.js.map +1 -0
  118. package/dist/src/rules/standards/ConfigPropertiesOrderingRule.d.ts +34 -0
  119. package/dist/src/rules/standards/ConfigPropertiesOrderingRule.d.ts.map +1 -0
  120. package/dist/src/rules/standards/ConfigPropertiesOrderingRule.js +76 -0
  121. package/dist/src/rules/standards/ConfigPropertiesOrderingRule.js.map +1 -0
  122. package/dist/src/rules/standards/MissingEnvPropertiesDeclarationRule.d.ts +25 -0
  123. package/dist/src/rules/standards/MissingEnvPropertiesDeclarationRule.d.ts.map +1 -0
  124. package/dist/src/rules/standards/MissingEnvPropertiesDeclarationRule.js +111 -0
  125. package/dist/src/rules/standards/MissingEnvPropertiesDeclarationRule.js.map +1 -0
  126. package/dist/src/rules/yaml/YamlRules.d.ts +6 -2
  127. package/dist/src/rules/yaml/YamlRules.d.ts.map +1 -1
  128. package/dist/src/rules/yaml/YamlRules.js +15 -11
  129. package/dist/src/rules/yaml/YamlRules.js.map +1 -1
  130. package/dist/src/types/Rule.d.ts +13 -0
  131. package/dist/src/types/Rule.d.ts.map +1 -1
  132. package/docs/best-practices/rules-catalog.md +337 -29
  133. package/docs/linter/architecture.md +119 -64
  134. package/package.json +1 -1
@@ -17,21 +17,23 @@ flowchart TB
17
17
  E --> D
18
18
  end
19
19
 
20
- subgraph Rules["Rules (56 Total)"]
21
- D --> R1[Error Handling<br/>MULE-001,003,005,007,009]
20
+ subgraph Rules["Rules (82 Total)"]
21
+ D --> R1[Error Handling<br/>MULE-001,003,005,007,009<br/>ERR-001,002,003,004]
22
22
  D --> R2[Naming<br/>MULE-002,101,102]
23
- D --> R3[Security<br/>MULE-004,201,202]
24
- D --> R4[Logging<br/>MULE-006,301,303]
25
- D --> R5[HTTP<br/>MULE-401,402,403]
26
- D --> R6[Performance<br/>MULE-501,502,503]
27
- D --> R7[Documentation<br/>MULE-601,604]
28
- D --> R8[Standards<br/>MULE-008,010,701]
23
+ D --> R3[Security<br/>MULE-004,201,202<br/>SEC-002,003,004,006,007,008,009,010]
24
+ D --> R4[Logging<br/>MULE-006,301,303<br/>LOG-001,004,HYG-001]
25
+ D --> R5[HTTP<br/>MULE-401,402,403,HTTP-004]
26
+ D --> R6[Performance<br/>MULE-501,502,503<br/>PERF-002,RES-001,002]
27
+ D --> R7[Documentation<br/>MULE-601,604,DOC-001]
28
+ D --> R8[Standards<br/>MULE-008,010,701<br/>OPS,CFG,STD]
29
29
  D --> R9[Complexity<br/>MULE-801]
30
30
  D --> R10[Structure<br/>MULE-802-804]
31
31
  D --> R11[YAML<br/>YAML-001,003,004]
32
- D --> R12[DataWeave<br/>DW-001,002,003]
33
- D --> R13[API-Led<br/>API-001,002,003]
34
- D --> R14[Experimental<br/>EXP-001,002,003]
32
+ D --> R12[DataWeave<br/>DW-001,002,003,004,005]
33
+ D --> R13[API-Led<br/>API-001-008]
34
+ D --> R14[Connectors<br/>SF-001,002]
35
+ D --> R15[Governance<br/>PROJ-001,002]
36
+ D --> R16[Experimental<br/>EXP-001,002,003]
35
37
  end
36
38
 
37
39
  subgraph Output["Formatters"]
@@ -64,16 +66,28 @@ sequenceDiagram
64
66
  Engine->>Scanner: scanDirectory(path)
65
67
  Scanner-->>Engine: ScannedFile[]
66
68
 
67
- loop Each XML File
69
+ Note over Engine: Pre-Scan Phase
70
+ loop Each XML File (Pre-Scan)
68
71
  Engine->>Parser: parseXml(content)
69
- Parser-->>Engine: Document
72
+ Parser-->>Engine: Document (cached)
73
+ Note over Engine: Collect allFlowRefs, allFlowNames
74
+ end
75
+ Note over Engine: Detect projectLayer
70
76
 
71
- loop Each Rule
77
+ loop Each XML File
78
+ Engine->>Engine: Get Document from cache
79
+ loop Each Per-File Rule
72
80
  Engine->>Rules: validate(doc, context)
73
81
  Rules-->>Engine: Issue[]
74
82
  end
75
83
  end
76
84
 
85
+ Note over Engine: Project Rules
86
+ loop Each Project Rule
87
+ Engine->>Rules: validateProject(context)
88
+ Rules-->>Engine: Issue[]
89
+ end
90
+
77
91
  loop YAML Rules
78
92
  Engine->>YAML: parseYaml(path)
79
93
  YAML-->>Engine: Properties
@@ -91,15 +105,36 @@ sequenceDiagram
91
105
  The central orchestrator that:
92
106
 
93
107
  1. Scans directories for XML and YAML files using FileScanner
94
- 2. Parses each file with XmlParser or YamlParser
95
- 3. Executes all enabled rules against each document
96
- 4. Aggregates results into a LintReport
108
+ 2. **Pre-scans** all XML files to collect cross-file metadata (`allFlowRefs`, `allFlowNames`, `projectContext` with `projectLayer`)
109
+ 3. **Caches** parsed XML `Document` objects to avoid redundant parsing
110
+ 4. Executes all enabled per-file rules against each cached document
111
+ 5. Executes project-level rules (`ProjectRule` subclasses) once per scan
112
+ 6. Aggregates results into a LintReport
97
113
 
98
114
  ```typescript
99
115
  const engine = new LintEngine({ rules: ALL_RULES, config });
100
116
  const report = await engine.scan('./project');
101
117
  ```
102
118
 
119
+ #### Document Cache
120
+
121
+ During `preScanFiles()`, the engine parses each XML file and stores the resulting `Document` in an internal `Map<string, Document>`. When `processFile()` runs, it retrieves the cached document instead of re-parsing. The cache is cleared after each scan to free memory.
122
+
123
+ #### Project Layer Detection
124
+
125
+ The engine automatically classifies projects into a `ProjectLayer`:
126
+
127
+ | Layer | Detection Heuristic |
128
+ | --------- | ----------------------------------------------------------- |
129
+ | `sapi` | Directory name contains `-sapi`, `-sys-`, or `-system-` |
130
+ | `papi` | Directory name contains `-papi`, `-proc-`, or `-process-` |
131
+ | `eapi` | Directory name contains `-eapi`, `-exp-`, or `-experience-` |
132
+ | `library` | Directory name contains `-library`, `-lib`, or `-common` |
133
+ | `batch` | Batch job elements detected in XML files |
134
+ | `unknown` | Default when no pattern matches |
135
+
136
+ Available to rules via `context.projectContext?.projectLayer`.
137
+
103
138
  ### XPathHelper
104
139
 
105
140
  Singleton utility for namespace-aware XPath queries:
@@ -111,20 +146,24 @@ const flows = xpath.selectNodes('//mule:flow', document);
111
146
 
112
147
  Pre-configured namespaces:
113
148
 
114
- | Prefix | Namespace |
115
- | -------- | ------------------------------------------------- |
116
- | `mule` | http://www.mulesoft.org/schema/mule/core |
117
- | `http` | http://www.mulesoft.org/schema/mule/http |
118
- | `ee` | http://www.mulesoft.org/schema/mule/ee/core |
119
- | `db` | http://www.mulesoft.org/schema/mule/db |
120
- | `doc` | http://www.mulesoft.org/schema/mule/documentation |
121
- | `tls` | http://www.mulesoft.org/schema/mule/tls |
122
- | `file` | http://www.mulesoft.org/schema/mule/file |
123
- | `sftp` | http://www.mulesoft.org/schema/mule/sftp |
124
- | `vm` | http://www.mulesoft.org/schema/mule/vm |
125
- | `jms` | http://www.mulesoft.org/schema/mule/jms |
126
- | `apikit` | http://www.mulesoft.org/schema/mule/mule-apikit |
127
- | `batch` | http://www.mulesoft.org/schema/mule/batch |
149
+ | Prefix | Namespace |
150
+ | ------------- | ------------------------------------------------- |
151
+ | `mule` | http://www.mulesoft.org/schema/mule/core |
152
+ | `http` | http://www.mulesoft.org/schema/mule/http |
153
+ | `ee` | http://www.mulesoft.org/schema/mule/ee/core |
154
+ | `db` | http://www.mulesoft.org/schema/mule/db |
155
+ | `doc` | http://www.mulesoft.org/schema/mule/documentation |
156
+ | `tls` | http://www.mulesoft.org/schema/mule/tls |
157
+ | `file` | http://www.mulesoft.org/schema/mule/file |
158
+ | `sftp` | http://www.mulesoft.org/schema/mule/sftp |
159
+ | `vm` | http://www.mulesoft.org/schema/mule/vm |
160
+ | `jms` | http://www.mulesoft.org/schema/mule/jms |
161
+ | `apikit` | http://www.mulesoft.org/schema/mule/mule-apikit |
162
+ | `batch` | http://www.mulesoft.org/schema/mule/batch |
163
+ | `netsuite` | http://www.mulesoft.org/schema/mule/netsuite |
164
+ | `sap` | http://www.mulesoft.org/schema/mule/sap |
165
+ | `anypoint-mq` | http://www.mulesoft.org/schema/mule/anypoint-mq |
166
+ | `oauth` | http://www.mulesoft.org/schema/mule/oauth |
128
167
 
129
168
  ### BaseRule
130
169
 
@@ -145,6 +184,11 @@ classDiagram
145
184
  #getOption(context, key, default): T
146
185
  }
147
186
 
187
+ class ProjectRule {
188
+ +validateProject(context): Issue[]
189
+ +validate(doc, context): Issue[]
190
+ }
191
+
148
192
  class FlowNamingRule {
149
193
  +validate()
150
194
  }
@@ -154,8 +198,14 @@ classDiagram
154
198
  #findYamlFiles(): string[]
155
199
  }
156
200
 
201
+ class GlobalErrorHandlerRule {
202
+ +validateProject()
203
+ }
204
+
157
205
  BaseRule <|-- FlowNamingRule
158
206
  BaseRule <|-- YamlRuleBase
207
+ BaseRule <|-- ProjectRule
208
+ ProjectRule <|-- GlobalErrorHandlerRule
159
209
  ```
160
210
 
161
211
  **Issue Types for Quality Metrics:**
@@ -212,11 +262,11 @@ XPathHelper.getInstance(); // Same instance always
212
262
  src/
213
263
  ├── index.ts # Package entry point
214
264
  ├── types/ # TypeScript interfaces
215
- │ ├── Rule.ts # Rule, Issue, Severity, IssueType
265
+ │ ├── Rule.ts # Rule, Issue, Severity, IssueType, ProjectLayer
216
266
  │ ├── Report.ts # LintReport, FileResult
217
267
  │ └── Config.ts # LintConfig, CliOptions
218
268
  ├── core/ # Core utilities
219
- │ ├── XPathHelper.ts # Namespace-aware XPath
269
+ │ ├── XPathHelper.ts # Namespace-aware XPath (16 namespaces)
220
270
  │ ├── XmlParser.ts # DOM parsing
221
271
  │ ├── YamlParser.ts # YAML parsing
222
272
  │ ├── FileScanner.ts # File discovery
@@ -228,23 +278,26 @@ src/
228
278
  │ ├── thresholds.ts # A-E rating boundaries
229
279
  │ └── calculator.ts # Rating calculation functions
230
280
  ├── engine/ # Orchestration
231
- │ └── LintEngine.ts # Main engine
232
- ├── rules/ # All rules (56 total)
233
- │ ├── index.ts # Rule registry
234
- │ ├── base/ # BaseRule class
235
- │ ├── api-led/ # API-001, 002, 003, 004
281
+ │ └── LintEngine.ts # Main engine (document cache, pre-scan, project layer)
282
+ ├── rules/ # All rules (82 total)
283
+ │ ├── index.ts # Rule registry (ALL_RULES array)
284
+ │ ├── base/ # BaseRule + ProjectRule classes
285
+ │ ├── api-led/ # API-001–004, API-006–008
236
286
  │ ├── complexity/ # MULE-801
237
- │ ├── dataweave/ # DW-001, 002, 003, 004
238
- │ ├── documentation/ # MULE-601, 604
239
- │ ├── error-handling/ # MULE-001, 003, 005, 007, 009 (issueType: bug)
240
- │ ├── experimental/ # EXP-001, 002, 003
241
- │ ├── http/ # MULE-401, 402, 403
242
- │ ├── logging/ # MULE-006, 301, 303
287
+ │ ├── connector/ # SF-001, SF-002
288
+ │ ├── dataweave/ # DW-001–005
289
+ │ ├── documentation/ # MULE-601, 604, DOC-001
290
+ │ ├── error-handling/ # MULE-001,003,005,007,009, ERR-001–004
291
+ │ ├── experimental/ # EXP-001–003
292
+ │ ├── governance/ # PROJ-001, PROJ-002
293
+ │ ├── http/ # MULE-401–403, HTTP-004
294
+ │ ├── logging/ # MULE-006,301,303, LOG-001,004, HYG-001
243
295
  │ ├── naming/ # MULE-002, 101, 102
244
- │ ├── performance/ # MULE-501, 502, 503
245
- │ ├── security/ # MULE-004, 201, 202 (issueType: vulnerability)
246
- │ ├── standards/ # MULE-008, 010, 701
247
- │ ├── structure/ # MULE-802, 803, 804
296
+ │ ├── operations/ # HYG-002–005
297
+ │ ├── performance/ # MULE-501–503, PERF-002, RES-001–002
298
+ │ ├── security/ # MULE-004,201,202, SEC-002–004,006–010
299
+ │ ├── standards/ # MULE-008,010,701, OPS-001–003, API-005, CFG-001–002, STD-001
300
+ │ ├── structure/ # MULE-802–804
248
301
  │ └── yaml/ # YAML-001, 003, 004
249
302
  └── formatters/ # Output formatters
250
303
  ├── TableFormatter.ts
@@ -262,22 +315,24 @@ src/
262
315
 
263
316
  ## Rule Categories
264
317
 
265
- | Category | ID Prefix | Count | Description |
266
- | -------------- | ------------------ | ----- | ---------------------------------------- |
267
- | Error Handling | MULE-00X | 5 | Error handler presence and configuration |
268
- | Naming | MULE-002, 10X | 3 | Flow, variable, and file naming |
269
- | Security | MULE-004, 20X | 3 | Hardcoded values and security |
270
- | Logging | MULE-006, 30X | 3 | Logger configuration |
271
- | HTTP | MULE-40X | 3 | HTTP request configuration |
272
- | Performance | MULE-50X | 3 | Performance anti-patterns |
273
- | Documentation | MULE-60X | 2 | Component documentation |
274
- | Standards | MULE-008, 010, 70X | 3 | Best practices |
275
- | Complexity | MULE-80X | 1 | Cyclomatic complexity |
276
- | Structure | MULE-80X | 3 | Project structure |
277
- | YAML | YAML-XXX | 3 | Properties validation |
278
- | DataWeave | DW-XXX | 3 | DWL file validation |
279
- | API-Led | API-XXX | 3 | API-Led patterns |
280
- | Experimental | EXP-XXX | 3 | Beta rules |
318
+ | Category | ID Prefix | Count | Description |
319
+ | -------------- | ------------------------------- | ----- | ---------------------------------------------- |
320
+ | Error Handling | MULE-00X, ERR-001–004 | 9 | Error handler configuration and best practices |
321
+ | Naming | MULE-002, 10X | 3 | Flow, variable, and file naming |
322
+ | Security | MULE-004, 20X, SEC-002–010 | 11 | Hardcoded values, TLS, credentials |
323
+ | Logging | MULE-006, 30X, LOG, HYG-001 | 6 | Logger configuration and hygiene |
324
+ | HTTP | MULE-40X, HTTP-004 | 4 | HTTP request configuration |
325
+ | Performance | MULE-50X, PERF-002, RES-001–002 | 6 | Performance anti-patterns and resilience |
326
+ | Documentation | MULE-60X, DOC-001 | 3 | Component documentation |
327
+ | Standards | MULE-008,010,70X, OPS, CFG, STD | 10 | Best practices and operations |
328
+ | Complexity | MULE-801 | 1 | Cyclomatic complexity |
329
+ | Structure | MULE-80X | 3 | Project structure |
330
+ | YAML | YAML-XXX | 3 | Properties validation |
331
+ | DataWeave | DW-XXX | 5 | DWL file validation |
332
+ | API-Led | API-XXX | 7 | API-Led patterns |
333
+ | Connectors | SF-001, SF-002 | 2 | Salesforce and event connector rules |
334
+ | Governance | PROJ-XXX | 2 | POM and Git hygiene |
335
+ | Experimental | EXP-XXX | 3 | Beta rules |
281
336
 
282
337
  ## Extension Points
283
338
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sfdxy/mule-lint",
3
- "version": "1.20.0",
3
+ "version": "1.21.0",
4
4
  "description": "Static analysis tool for MuleSoft applications - supports humans, AI agents, and CI/CD pipelines",
5
5
  "author": "Avinava",
6
6
  "license": "MIT",