code-auditor-mcp 3.4.18 → 3.6.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.
- package/.claude-plugin/marketplace.json +1 -1
- package/CHANGELOG.md +99 -0
- package/README.md +5 -5
- package/dist/analyzers/applicability.d.ts +19 -5
- package/dist/analyzers/applicability.d.ts.map +1 -1
- package/dist/analyzers/applicability.js +36 -24
- package/dist/analyzers/applicability.js.map +1 -1
- package/dist/analyzers/cross-language/APIContractAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/cross-language/APIContractAnalyzer.js +23 -2
- package/dist/analyzers/cross-language/APIContractAnalyzer.js.map +1 -1
- package/dist/analyzers/cross-language/DependencyGraphBuilder.d.ts +52 -9
- package/dist/analyzers/cross-language/DependencyGraphBuilder.d.ts.map +1 -1
- package/dist/analyzers/cross-language/DependencyGraphBuilder.js +228 -55
- package/dist/analyzers/cross-language/DependencyGraphBuilder.js.map +1 -1
- package/dist/analyzers/cross-language/SchemaValidator.d.ts +19 -12
- package/dist/analyzers/cross-language/SchemaValidator.d.ts.map +1 -1
- package/dist/analyzers/cross-language/SchemaValidator.js +78 -111
- package/dist/analyzers/cross-language/SchemaValidator.js.map +1 -1
- package/dist/analyzers/crossDomain/CrossDomainAnalyzer.d.ts +0 -6
- package/dist/analyzers/crossDomain/CrossDomainAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/crossDomain/CrossDomainAnalyzer.js +85 -73
- package/dist/analyzers/crossDomain/CrossDomainAnalyzer.js.map +1 -1
- package/dist/analyzers/documentationAnalyzer.js +5 -5
- package/dist/analyzers/documentationAnalyzer.js.map +1 -1
- package/dist/analyzers/invariantsAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/invariantsAnalyzer.js +1 -0
- package/dist/analyzers/invariantsAnalyzer.js.map +1 -1
- package/dist/analyzers/provenance.d.ts +7 -9
- package/dist/analyzers/provenance.d.ts.map +1 -1
- package/dist/analyzers/provenance.js +88 -124
- package/dist/analyzers/provenance.js.map +1 -1
- package/dist/analyzers/reactAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/reactAnalyzer.js +120 -21
- package/dist/analyzers/reactAnalyzer.js.map +1 -1
- package/dist/analyzers/ruleRegistry.d.ts +35 -12
- package/dist/analyzers/ruleRegistry.d.ts.map +1 -1
- package/dist/analyzers/ruleRegistry.js +66 -108
- package/dist/analyzers/ruleRegistry.js.map +1 -1
- package/dist/analyzers/ruleTiming.d.ts +2 -2
- package/dist/analyzers/ruleTiming.js +2 -2
- package/dist/analyzers/universal/UniversalConventionsAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalConventionsAnalyzer.js +60 -24
- package/dist/analyzers/universal/UniversalConventionsAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/UniversalDRYAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalDRYAnalyzer.js +5 -2
- package/dist/analyzers/universal/UniversalDRYAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/UniversalDataAccessAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalDataAccessAnalyzer.js +82 -71
- package/dist/analyzers/universal/UniversalDataAccessAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/UniversalDocumentationAnalyzer.d.ts +2 -1
- package/dist/analyzers/universal/UniversalDocumentationAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalDocumentationAnalyzer.js +23 -12
- package/dist/analyzers/universal/UniversalDocumentationAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/UniversalSOLIDAnalyzer.d.ts +11 -1
- package/dist/analyzers/universal/UniversalSOLIDAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalSOLIDAnalyzer.js +60 -22
- package/dist/analyzers/universal/UniversalSOLIDAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.js +5 -2
- package/dist/analyzers/universal/UniversalSchemaAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/UniversalStylesAnalyzer.d.ts +2 -3
- package/dist/analyzers/universal/UniversalStylesAnalyzer.d.ts.map +1 -1
- package/dist/analyzers/universal/UniversalStylesAnalyzer.js +258 -87
- package/dist/analyzers/universal/UniversalStylesAnalyzer.js.map +1 -1
- package/dist/analyzers/universal/schema/codeAnalysis.d.ts.map +1 -1
- package/dist/analyzers/universal/schema/codeAnalysis.js +7 -1
- package/dist/analyzers/universal/schema/codeAnalysis.js.map +1 -1
- package/dist/analyzers/universal/schema/discovery.d.ts +29 -1
- package/dist/analyzers/universal/schema/discovery.d.ts.map +1 -1
- package/dist/analyzers/universal/schema/discovery.js +76 -21
- package/dist/analyzers/universal/schema/discovery.js.map +1 -1
- package/dist/analyzers/universal/schema/jsonSchema.js +7 -11
- package/dist/analyzers/universal/schema/jsonSchema.js.map +1 -1
- package/dist/auditRouter.d.ts +41 -0
- package/dist/auditRouter.d.ts.map +1 -0
- package/dist/auditRouter.js +185 -0
- package/dist/auditRouter.js.map +1 -0
- package/dist/auditRunner.d.ts.map +1 -1
- package/dist/auditRunner.js +93 -84
- package/dist/auditRunner.js.map +1 -1
- package/dist/cli.js +306 -95
- package/dist/cli.js.map +1 -1
- package/dist/codeIndexDB.d.ts.map +1 -1
- package/dist/codeIndexDB.js +41 -7
- package/dist/codeIndexDB.js.map +1 -1
- package/dist/componentScanner.d.ts.map +1 -1
- package/dist/componentScanner.js +2 -1
- package/dist/componentScanner.js.map +1 -1
- package/dist/config/configLoader.d.ts +9 -0
- package/dist/config/configLoader.d.ts.map +1 -1
- package/dist/config/configLoader.js +45 -2
- package/dist/config/configLoader.js.map +1 -1
- package/dist/config/defaults.d.ts +8 -1
- package/dist/config/defaults.d.ts.map +1 -1
- package/dist/config/defaults.js +19 -3
- package/dist/config/defaults.js.map +1 -1
- package/dist/dataPaths.js +18 -1
- package/dist/dataPaths.js.map +1 -1
- package/dist/enforcement/gate.d.ts +14 -19
- package/dist/enforcement/gate.d.ts.map +1 -1
- package/dist/enforcement/gate.js +27 -45
- package/dist/enforcement/gate.js.map +1 -1
- package/dist/functionScanner.d.ts.map +1 -1
- package/dist/functionScanner.js +1 -17
- package/dist/functionScanner.js.map +1 -1
- package/dist/invariants/ruleEngine.d.ts +8 -0
- package/dist/invariants/ruleEngine.d.ts.map +1 -1
- package/dist/invariants/ruleEngine.js +35 -16
- package/dist/invariants/ruleEngine.js.map +1 -1
- package/dist/languages/LanguageOrchestrator.d.ts +9 -10
- package/dist/languages/LanguageOrchestrator.d.ts.map +1 -1
- package/dist/languages/LanguageOrchestrator.js +135 -101
- package/dist/languages/LanguageOrchestrator.js.map +1 -1
- package/dist/languages/RuntimeManager.d.ts +28 -1
- package/dist/languages/RuntimeManager.d.ts.map +1 -1
- package/dist/languages/RuntimeManager.js +158 -47
- package/dist/languages/RuntimeManager.js.map +1 -1
- package/dist/languages/go/GoAdapter.d.ts +2 -0
- package/dist/languages/go/GoAdapter.d.ts.map +1 -1
- package/dist/languages/go/GoAdapter.js +15 -22
- package/dist/languages/go/GoAdapter.js.map +1 -1
- package/dist/languages/go/analyzer +0 -0
- package/dist/languages/go/analyzer-src/analyzer.go +510 -0
- package/dist/languages/go/analyzer-src/go.mod +3 -0
- package/dist/languages/go/analyzer-src/indexer.go +268 -0
- package/dist/languages/go/analyzer-src/parser.go +461 -0
- package/dist/languages/go/analyzer-src/solid.go +395 -0
- package/dist/languages/go/analyzer-src/testconventions.go +25 -0
- package/dist/languages/go/analyzer-src/types.go +148 -0
- package/dist/languages/go/go.mod +7 -0
- package/dist/languages/go/main.go +203 -0
- package/dist/languages/testConventions.d.ts +35 -0
- package/dist/languages/testConventions.d.ts.map +1 -0
- package/dist/languages/testConventions.js +51 -0
- package/dist/languages/testConventions.js.map +1 -0
- package/dist/languages/typescript/TreeSitterTypeScriptAdapter.d.ts +3 -0
- package/dist/languages/typescript/TreeSitterTypeScriptAdapter.d.ts.map +1 -1
- package/dist/languages/typescript/TreeSitterTypeScriptAdapter.js +25 -18
- package/dist/languages/typescript/TreeSitterTypeScriptAdapter.js.map +1 -1
- package/dist/mcp-tools/whitelistTools.d.ts +1 -1
- package/dist/mcp-tools-shared.d.ts +0 -3
- package/dist/mcp-tools-shared.d.ts.map +1 -1
- package/dist/mcp-tools-shared.js +8 -117
- package/dist/mcp-tools-shared.js.map +1 -1
- package/dist/mcp.js +3 -1
- package/dist/mcp.js.map +1 -1
- package/dist/mcpAuditJobs.d.ts.map +1 -1
- package/dist/mcpAuditJobs.js +13 -0
- package/dist/mcpAuditJobs.js.map +1 -1
- package/dist/nextFile.d.ts +21 -0
- package/dist/nextFile.d.ts.map +1 -0
- package/dist/nextFile.js +51 -0
- package/dist/nextFile.js.map +1 -0
- package/dist/nextFileIncremental.d.ts +141 -0
- package/dist/nextFileIncremental.d.ts.map +1 -0
- package/dist/nextFileIncremental.js +314 -0
- package/dist/nextFileIncremental.js.map +1 -0
- package/dist/pipeline.d.ts.map +1 -1
- package/dist/pipeline.js +43 -3
- package/dist/pipeline.js.map +1 -1
- package/dist/pipelineAdapters.d.ts +17 -0
- package/dist/pipelineAdapters.d.ts.map +1 -1
- package/dist/pipelineAdapters.js +791 -40
- package/dist/pipelineAdapters.js.map +1 -1
- package/dist/reporting/jsonReportGenerator.d.ts.map +1 -1
- package/dist/reporting/jsonReportGenerator.js +11 -30
- package/dist/reporting/jsonReportGenerator.js.map +1 -1
- package/dist/styles/styleExtractor.js +2 -2
- package/dist/styles/styleExtractor.js.map +1 -1
- package/dist/styles/styleIndexer.d.ts +7 -0
- package/dist/styles/styleIndexer.d.ts.map +1 -1
- package/dist/styles/styleIndexer.js +51 -67
- package/dist/styles/styleIndexer.js.map +1 -1
- package/dist/styles/types.d.ts +3 -2
- package/dist/styles/types.d.ts.map +1 -1
- package/dist/types/crossLanguage.d.ts +1 -0
- package/dist/types/crossLanguage.d.ts.map +1 -1
- package/dist/types.d.ts +43 -34
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/utils/fileDiscovery.d.ts +9 -0
- package/dist/utils/fileDiscovery.d.ts.map +1 -1
- package/dist/utils/fileDiscovery.js +18 -0
- package/dist/utils/fileDiscovery.js.map +1 -1
- package/package.json +16 -6
- package/plugin/.claude-plugin/plugin.json +1 -1
- package/plugin/README.md +11 -9
- package/plugin/hooks/hooks.json +4 -0
- package/plugin/scripts/hook-audit.sh +20 -30
- package/plugin/scripts/hook-common.sh +63 -0
- package/plugin/scripts/hook-self-audit.sh +99 -0
- package/plugin/skills/code-auditor/SKILL-RULE-KINDS.md +55 -9
- package/plugin/skills/code-auditor/SKILL.md +22 -23
|
@@ -11,7 +11,6 @@ export const RULE_REGISTRY = {
|
|
|
11
11
|
analyzer: 'solid',
|
|
12
12
|
field: 'rule',
|
|
13
13
|
input: ['files'],
|
|
14
|
-
gating: true,
|
|
15
14
|
resolvable: true,
|
|
16
15
|
message: 'Class "{name}" has {methods} methods, exceeding the maximum of {max}. Consider splitting responsibilities.',
|
|
17
16
|
docs: 'solid/class-size',
|
|
@@ -32,7 +31,6 @@ export const RULE_REGISTRY = {
|
|
|
32
31
|
analyzer: 'solid',
|
|
33
32
|
field: 'rule',
|
|
34
33
|
input: ['files'],
|
|
35
|
-
gating: false,
|
|
36
34
|
resolvable: false,
|
|
37
35
|
message: 'Method "{name}" has cyclomatic complexity {complexity}, exceeding the maximum of {max}.',
|
|
38
36
|
docs: 'solid/method-complexity',
|
|
@@ -50,7 +48,6 @@ export const RULE_REGISTRY = {
|
|
|
50
48
|
analyzer: 'solid',
|
|
51
49
|
field: 'rule',
|
|
52
50
|
input: ['files'],
|
|
53
|
-
gating: false,
|
|
54
51
|
resolvable: false,
|
|
55
52
|
message: 'Class "{name}" violates the Open/Closed Principle.',
|
|
56
53
|
docs: 'solid/open-closed',
|
|
@@ -68,7 +65,6 @@ export const RULE_REGISTRY = {
|
|
|
68
65
|
analyzer: 'solid',
|
|
69
66
|
field: 'rule',
|
|
70
67
|
input: ['files'],
|
|
71
|
-
gating: true,
|
|
72
68
|
resolvable: true,
|
|
73
69
|
message: 'Function "{name}" has {count} {metric}, exceeding the maximum of {max}. Break it down.',
|
|
74
70
|
docs: 'solid/single-responsibility',
|
|
@@ -89,9 +85,8 @@ export const RULE_REGISTRY = {
|
|
|
89
85
|
analyzer: 'solid',
|
|
90
86
|
field: 'rule',
|
|
91
87
|
input: ['files'],
|
|
92
|
-
gating: false,
|
|
93
88
|
resolvable: false,
|
|
94
|
-
message: 'Interface "{name}"
|
|
89
|
+
message: 'Interface "{name}" has many members.',
|
|
95
90
|
docs: 'solid/interface-segregation',
|
|
96
91
|
thresholds: [],
|
|
97
92
|
samples: {
|
|
@@ -107,17 +102,16 @@ export const RULE_REGISTRY = {
|
|
|
107
102
|
analyzer: 'solid',
|
|
108
103
|
field: 'rule',
|
|
109
104
|
input: ['files'],
|
|
110
|
-
gating: false,
|
|
111
105
|
resolvable: false,
|
|
112
|
-
message: '
|
|
106
|
+
message: 'Method "{name}" overrides a parent method and throws where the parent does not.',
|
|
113
107
|
docs: 'solid/liskov-substitution',
|
|
114
108
|
thresholds: [],
|
|
115
109
|
samples: {
|
|
116
110
|
valid: [
|
|
117
|
-
{ code: 'class Bird {\n fly() { return "flying"; }\n}', nearMiss: true },
|
|
111
|
+
{ code: 'class Bird {\n fly() { return "flying"; }\n}\nclass Sparrow extends Bird {\n fly() { return "flying"; }\n}', nearMiss: true },
|
|
118
112
|
],
|
|
119
113
|
invalid: [
|
|
120
|
-
{ code: 'class Ostrich extends Bird {\n fly() { throw new Error("cannot fly"); }\n}' },
|
|
114
|
+
{ code: 'class Bird {\n fly() { return "flying"; }\n}\nclass Ostrich extends Bird {\n fly() { throw new Error("cannot fly"); }\n}' },
|
|
121
115
|
],
|
|
122
116
|
},
|
|
123
117
|
},
|
|
@@ -125,7 +119,6 @@ export const RULE_REGISTRY = {
|
|
|
125
119
|
analyzer: 'solid',
|
|
126
120
|
field: 'rule',
|
|
127
121
|
input: ['files'],
|
|
128
|
-
gating: false,
|
|
129
122
|
resolvable: false,
|
|
130
123
|
message: 'Module "{name}" violates the Dependency Inversion Principle.',
|
|
131
124
|
docs: 'solid/dependency-inversion',
|
|
@@ -144,7 +137,6 @@ export const RULE_REGISTRY = {
|
|
|
144
137
|
analyzer: 'dry',
|
|
145
138
|
field: 'rule',
|
|
146
139
|
input: ['files'],
|
|
147
|
-
gating: true,
|
|
148
140
|
resolvable: true,
|
|
149
141
|
message: 'Duplicate code block detected ({lines} lines). First occurrence at {file}:{line}.',
|
|
150
142
|
docs: 'dry/duplicate',
|
|
@@ -166,7 +158,6 @@ export const RULE_REGISTRY = {
|
|
|
166
158
|
field: 'rule',
|
|
167
159
|
configGate: 'checkStructuralSimilarity',
|
|
168
160
|
input: ['files'],
|
|
169
|
-
gating: false,
|
|
170
161
|
resolvable: false,
|
|
171
162
|
message: 'Structurally similar code block detected ({similarity}% similar to {file}:{line}).',
|
|
172
163
|
docs: 'dry/structural-similarity',
|
|
@@ -185,7 +176,6 @@ export const RULE_REGISTRY = {
|
|
|
185
176
|
field: 'rule',
|
|
186
177
|
configGate: 'checkStrings',
|
|
187
178
|
input: ['files'],
|
|
188
|
-
gating: false,
|
|
189
179
|
resolvable: false,
|
|
190
180
|
message: 'String literal "{text}" is duplicated {count} times.',
|
|
191
181
|
docs: 'duplicate-string-literal',
|
|
@@ -204,7 +194,6 @@ export const RULE_REGISTRY = {
|
|
|
204
194
|
field: 'rule',
|
|
205
195
|
configGate: 'checkImports',
|
|
206
196
|
input: ['files'],
|
|
207
|
-
gating: false,
|
|
208
197
|
resolvable: false,
|
|
209
198
|
message: 'Duplicate import of "{module}".',
|
|
210
199
|
docs: 'duplicate-import',
|
|
@@ -223,7 +212,6 @@ export const RULE_REGISTRY = {
|
|
|
223
212
|
analyzer: 'data-access',
|
|
224
213
|
field: 'rule',
|
|
225
214
|
input: ['files'],
|
|
226
|
-
gating: true,
|
|
227
215
|
resolvable: true,
|
|
228
216
|
message: 'Potential SQL injection risk in {method}. Use parameterized queries.',
|
|
229
217
|
docs: 'sql-injection-risk',
|
|
@@ -244,7 +232,6 @@ export const RULE_REGISTRY = {
|
|
|
244
232
|
analyzer: 'data-access',
|
|
245
233
|
field: 'rule',
|
|
246
234
|
input: ['schema'],
|
|
247
|
-
gating: false,
|
|
248
235
|
resolvable: false,
|
|
249
236
|
message: 'Query on {tables} is missing an organization/tenant filter.',
|
|
250
237
|
docs: 'missing-org-filter',
|
|
@@ -262,9 +249,8 @@ export const RULE_REGISTRY = {
|
|
|
262
249
|
analyzer: 'data-access',
|
|
263
250
|
field: 'rule',
|
|
264
251
|
input: ['files'],
|
|
265
|
-
gating: false,
|
|
266
252
|
resolvable: false,
|
|
267
|
-
message: '
|
|
253
|
+
message: 'Query references {tables} tables.',
|
|
268
254
|
docs: 'complex-query',
|
|
269
255
|
thresholds: ['performanceThresholds.joinedTableCount'],
|
|
270
256
|
samples: {
|
|
@@ -280,9 +266,8 @@ export const RULE_REGISTRY = {
|
|
|
280
266
|
analyzer: 'data-access',
|
|
281
267
|
field: 'rule',
|
|
282
268
|
input: ['files'],
|
|
283
|
-
gating: false,
|
|
284
269
|
resolvable: false,
|
|
285
|
-
message: '
|
|
270
|
+
message: 'Query on {tables} has no filter.',
|
|
286
271
|
docs: 'unfiltered-query',
|
|
287
272
|
thresholds: [],
|
|
288
273
|
samples: {
|
|
@@ -298,7 +283,6 @@ export const RULE_REGISTRY = {
|
|
|
298
283
|
analyzer: 'data-access',
|
|
299
284
|
field: 'rule',
|
|
300
285
|
input: ['files'],
|
|
301
|
-
gating: false,
|
|
302
286
|
resolvable: false,
|
|
303
287
|
message: 'Hardcoded database connection string detected.',
|
|
304
288
|
docs: 'hardcoded-connection',
|
|
@@ -316,7 +300,6 @@ export const RULE_REGISTRY = {
|
|
|
316
300
|
analyzer: 'data-access',
|
|
317
301
|
field: 'rule',
|
|
318
302
|
input: ['files'],
|
|
319
|
-
gating: false,
|
|
320
303
|
resolvable: false,
|
|
321
304
|
message: 'Database query inside a loop detected in {method}.',
|
|
322
305
|
docs: 'loop-query',
|
|
@@ -335,14 +318,13 @@ export const RULE_REGISTRY = {
|
|
|
335
318
|
analyzer: 'documentation',
|
|
336
319
|
field: 'rule',
|
|
337
320
|
input: ['files'],
|
|
338
|
-
gating: false,
|
|
339
321
|
resolvable: false,
|
|
340
|
-
message: 'File is missing a documentation
|
|
322
|
+
message: 'File is missing a leading documentation comment.',
|
|
341
323
|
docs: 'file-documentation',
|
|
342
324
|
thresholds: ['minDescriptionLength'],
|
|
343
325
|
samples: {
|
|
344
326
|
valid: [
|
|
345
|
-
{ code: '/** Core utilities for this module. */\nexport const a = 1;', nearMiss: true },
|
|
327
|
+
{ code: '/** @fileoverview Core utilities for this module. */\nexport const a = 1;', nearMiss: true },
|
|
346
328
|
],
|
|
347
329
|
invalid: [
|
|
348
330
|
{ code: 'export const a = 1;' },
|
|
@@ -353,9 +335,8 @@ export const RULE_REGISTRY = {
|
|
|
353
335
|
analyzer: 'documentation',
|
|
354
336
|
field: 'rule',
|
|
355
337
|
input: ['files'],
|
|
356
|
-
gating: false,
|
|
357
338
|
resolvable: false,
|
|
358
|
-
message: 'Function "{name}" is missing a
|
|
339
|
+
message: 'Function "{name}" is missing a doc comment.',
|
|
359
340
|
docs: 'function-documentation',
|
|
360
341
|
thresholds: ['minDescriptionLength'],
|
|
361
342
|
samples: {
|
|
@@ -371,7 +352,6 @@ export const RULE_REGISTRY = {
|
|
|
371
352
|
analyzer: 'documentation',
|
|
372
353
|
field: 'rule',
|
|
373
354
|
input: ['files'],
|
|
374
|
-
gating: false,
|
|
375
355
|
resolvable: false,
|
|
376
356
|
message: 'Parameter "{name}" in function "{func}" is missing a @param tag.',
|
|
377
357
|
docs: 'parameter-documentation',
|
|
@@ -389,7 +369,6 @@ export const RULE_REGISTRY = {
|
|
|
389
369
|
analyzer: 'documentation',
|
|
390
370
|
field: 'rule',
|
|
391
371
|
input: ['files'],
|
|
392
|
-
gating: false,
|
|
393
372
|
resolvable: false,
|
|
394
373
|
message: 'Function "{name}" is missing a @returns tag.',
|
|
395
374
|
docs: 'return-documentation',
|
|
@@ -407,9 +386,8 @@ export const RULE_REGISTRY = {
|
|
|
407
386
|
analyzer: 'documentation',
|
|
408
387
|
field: 'rule',
|
|
409
388
|
input: ['files'],
|
|
410
|
-
gating: false,
|
|
411
389
|
resolvable: false,
|
|
412
|
-
message: 'Class "{name}" is missing a
|
|
390
|
+
message: 'Class "{name}" is missing a doc comment.',
|
|
413
391
|
docs: 'class-documentation',
|
|
414
392
|
thresholds: ['minDescriptionLength', 'docsMinLines'],
|
|
415
393
|
samples: {
|
|
@@ -425,9 +403,8 @@ export const RULE_REGISTRY = {
|
|
|
425
403
|
analyzer: 'documentation',
|
|
426
404
|
field: 'rule',
|
|
427
405
|
input: ['files'],
|
|
428
|
-
gating: false,
|
|
429
406
|
resolvable: false,
|
|
430
|
-
message: 'Method "{name}" is missing a
|
|
407
|
+
message: 'Method "{name}" is missing a doc comment.',
|
|
431
408
|
docs: 'method-documentation',
|
|
432
409
|
thresholds: ['minDescriptionLength'],
|
|
433
410
|
samples: {
|
|
@@ -445,7 +422,6 @@ export const RULE_REGISTRY = {
|
|
|
445
422
|
analyzer: 'schema',
|
|
446
423
|
field: 'rule',
|
|
447
424
|
input: ['schema-json'],
|
|
448
|
-
gating: false,
|
|
449
425
|
resolvable: false,
|
|
450
426
|
message: 'Invalid JSON: {error}.',
|
|
451
427
|
docs: 'invalid-json',
|
|
@@ -463,7 +439,6 @@ export const RULE_REGISTRY = {
|
|
|
463
439
|
analyzer: 'schema',
|
|
464
440
|
field: 'rule',
|
|
465
441
|
input: ['schema-json'],
|
|
466
|
-
gating: false,
|
|
467
442
|
resolvable: false,
|
|
468
443
|
message: 'Missing JSON schema declaration.',
|
|
469
444
|
docs: 'missing-schema-declaration',
|
|
@@ -481,7 +456,6 @@ export const RULE_REGISTRY = {
|
|
|
481
456
|
analyzer: 'schema',
|
|
482
457
|
field: 'rule',
|
|
483
458
|
input: ['schema-json'],
|
|
484
|
-
gating: false,
|
|
485
459
|
resolvable: false,
|
|
486
460
|
message: 'Undefined required field "{field}".',
|
|
487
461
|
docs: 'undefined-required-field',
|
|
@@ -499,7 +473,6 @@ export const RULE_REGISTRY = {
|
|
|
499
473
|
analyzer: 'schema',
|
|
500
474
|
field: 'rule',
|
|
501
475
|
input: ['schema-json'],
|
|
502
|
-
gating: false,
|
|
503
476
|
resolvable: false,
|
|
504
477
|
message: 'Invalid type for field "{field}".',
|
|
505
478
|
docs: 'invalid-type',
|
|
@@ -517,7 +490,6 @@ export const RULE_REGISTRY = {
|
|
|
517
490
|
analyzer: 'schema',
|
|
518
491
|
field: 'rule',
|
|
519
492
|
input: ['schema-json'],
|
|
520
|
-
gating: false,
|
|
521
493
|
resolvable: false,
|
|
522
494
|
message: 'Invalid range for field "{field}".',
|
|
523
495
|
docs: 'invalid-range',
|
|
@@ -535,7 +507,6 @@ export const RULE_REGISTRY = {
|
|
|
535
507
|
analyzer: 'schema',
|
|
536
508
|
field: 'rule',
|
|
537
509
|
input: ['schema-json'],
|
|
538
|
-
gating: false,
|
|
539
510
|
resolvable: false,
|
|
540
511
|
message: 'Error processing schema file: {error}.',
|
|
541
512
|
docs: 'file-error',
|
|
@@ -553,7 +524,6 @@ export const RULE_REGISTRY = {
|
|
|
553
524
|
analyzer: 'schema',
|
|
554
525
|
field: 'rule',
|
|
555
526
|
input: ['schema-json'],
|
|
556
|
-
gating: false,
|
|
557
527
|
resolvable: false,
|
|
558
528
|
message: 'Type mismatch for field "{field}".',
|
|
559
529
|
docs: 'type-mismatch',
|
|
@@ -571,7 +541,6 @@ export const RULE_REGISTRY = {
|
|
|
571
541
|
analyzer: 'schema',
|
|
572
542
|
field: 'rule',
|
|
573
543
|
input: ['schema-json'],
|
|
574
|
-
gating: false,
|
|
575
544
|
resolvable: false,
|
|
576
545
|
message: 'String value too short for field "{field}".',
|
|
577
546
|
docs: 'string-too-short',
|
|
@@ -589,7 +558,6 @@ export const RULE_REGISTRY = {
|
|
|
589
558
|
analyzer: 'schema',
|
|
590
559
|
field: 'rule',
|
|
591
560
|
input: ['schema-json'],
|
|
592
|
-
gating: false,
|
|
593
561
|
resolvable: false,
|
|
594
562
|
message: 'String value too long for field "{field}".',
|
|
595
563
|
docs: 'string-too-long',
|
|
@@ -607,7 +575,6 @@ export const RULE_REGISTRY = {
|
|
|
607
575
|
analyzer: 'schema',
|
|
608
576
|
field: 'rule',
|
|
609
577
|
input: ['schema-json'],
|
|
610
|
-
gating: false,
|
|
611
578
|
resolvable: false,
|
|
612
579
|
message: 'Value does not match pattern for field "{field}".',
|
|
613
580
|
docs: 'pattern-mismatch',
|
|
@@ -625,7 +592,6 @@ export const RULE_REGISTRY = {
|
|
|
625
592
|
analyzer: 'schema',
|
|
626
593
|
field: 'rule',
|
|
627
594
|
input: ['schema-json'],
|
|
628
|
-
gating: false,
|
|
629
595
|
resolvable: false,
|
|
630
596
|
message: 'Invalid format for field "{field}".',
|
|
631
597
|
docs: 'invalid-format',
|
|
@@ -643,7 +609,6 @@ export const RULE_REGISTRY = {
|
|
|
643
609
|
analyzer: 'schema',
|
|
644
610
|
field: 'rule',
|
|
645
611
|
input: ['schema-json'],
|
|
646
|
-
gating: false,
|
|
647
612
|
resolvable: false,
|
|
648
613
|
message: 'Value below minimum for field "{field}".',
|
|
649
614
|
docs: 'below-minimum',
|
|
@@ -661,7 +626,6 @@ export const RULE_REGISTRY = {
|
|
|
661
626
|
analyzer: 'schema',
|
|
662
627
|
field: 'rule',
|
|
663
628
|
input: ['schema-json'],
|
|
664
|
-
gating: false,
|
|
665
629
|
resolvable: false,
|
|
666
630
|
message: 'Value above maximum for field "{field}".',
|
|
667
631
|
docs: 'above-maximum',
|
|
@@ -679,7 +643,6 @@ export const RULE_REGISTRY = {
|
|
|
679
643
|
analyzer: 'schema',
|
|
680
644
|
field: 'rule',
|
|
681
645
|
input: ['schema-json'],
|
|
682
|
-
gating: false,
|
|
683
646
|
resolvable: false,
|
|
684
647
|
message: 'Too few items for field "{field}".',
|
|
685
648
|
docs: 'too-few-items',
|
|
@@ -697,7 +660,6 @@ export const RULE_REGISTRY = {
|
|
|
697
660
|
analyzer: 'schema',
|
|
698
661
|
field: 'rule',
|
|
699
662
|
input: ['schema-json'],
|
|
700
|
-
gating: false,
|
|
701
663
|
resolvable: false,
|
|
702
664
|
message: 'Too many items for field "{field}".',
|
|
703
665
|
docs: 'too-many-items',
|
|
@@ -715,7 +677,6 @@ export const RULE_REGISTRY = {
|
|
|
715
677
|
analyzer: 'schema',
|
|
716
678
|
field: 'rule',
|
|
717
679
|
input: ['schema-json'],
|
|
718
|
-
gating: false,
|
|
719
680
|
resolvable: false,
|
|
720
681
|
message: 'Missing required field "{field}".',
|
|
721
682
|
docs: 'missing-required-field',
|
|
@@ -733,7 +694,6 @@ export const RULE_REGISTRY = {
|
|
|
733
694
|
analyzer: 'schema',
|
|
734
695
|
field: 'rule',
|
|
735
696
|
input: ['schema-json'],
|
|
736
|
-
gating: false,
|
|
737
697
|
resolvable: false,
|
|
738
698
|
message: 'Unexpected property "{property}".',
|
|
739
699
|
docs: 'unexpected-property',
|
|
@@ -751,7 +711,6 @@ export const RULE_REGISTRY = {
|
|
|
751
711
|
analyzer: 'schema',
|
|
752
712
|
field: 'rule',
|
|
753
713
|
input: ['schema-json'],
|
|
754
|
-
gating: false,
|
|
755
714
|
resolvable: false,
|
|
756
715
|
message: 'Value does not match any enum value for field "{field}".',
|
|
757
716
|
docs: 'enum-mismatch',
|
|
@@ -770,7 +729,6 @@ export const RULE_REGISTRY = {
|
|
|
770
729
|
analyzer: 'schema',
|
|
771
730
|
field: 'rule',
|
|
772
731
|
input: ['schema-code'],
|
|
773
|
-
gating: false,
|
|
774
732
|
resolvable: false,
|
|
775
733
|
message: 'Potential SQL injection via string interpolation in {method}.',
|
|
776
734
|
docs: 'sql-injection',
|
|
@@ -791,7 +749,6 @@ export const RULE_REGISTRY = {
|
|
|
791
749
|
field: 'rule',
|
|
792
750
|
configGate: 'checkNamingConventions',
|
|
793
751
|
input: ['schema-code'],
|
|
794
|
-
gating: false,
|
|
795
752
|
resolvable: false,
|
|
796
753
|
message: 'Table name "{table}" should use snake_case convention.',
|
|
797
754
|
docs: 'table-naming-convention',
|
|
@@ -810,7 +767,6 @@ export const RULE_REGISTRY = {
|
|
|
810
767
|
analyzer: 'schema',
|
|
811
768
|
field: 'rule',
|
|
812
769
|
input: ['schema-code'],
|
|
813
|
-
gating: true,
|
|
814
770
|
resolvable: true,
|
|
815
771
|
message: 'Reference to unknown table "{table}" ({type}). Did you mean: {suggestions}?',
|
|
816
772
|
docs: 'unknown-table',
|
|
@@ -832,7 +788,6 @@ export const RULE_REGISTRY = {
|
|
|
832
788
|
analyzer: 'react',
|
|
833
789
|
field: 'rule',
|
|
834
790
|
input: ['files'],
|
|
835
|
-
gating: false,
|
|
836
791
|
resolvable: false,
|
|
837
792
|
message: 'React hook "{name}" does not follow the "use*" naming convention.',
|
|
838
793
|
docs: 'hooks-naming',
|
|
@@ -850,7 +805,6 @@ export const RULE_REGISTRY = {
|
|
|
850
805
|
analyzer: 'react',
|
|
851
806
|
field: 'rule',
|
|
852
807
|
input: ['files'],
|
|
853
|
-
gating: false,
|
|
854
808
|
resolvable: false,
|
|
855
809
|
message: 'React component "{name}" has complexity {complexity}, exceeding the maximum.',
|
|
856
810
|
docs: 'complexity',
|
|
@@ -869,7 +823,6 @@ export const RULE_REGISTRY = {
|
|
|
869
823
|
field: 'rule',
|
|
870
824
|
configGate: 'requirePropTypes',
|
|
871
825
|
input: ['files'],
|
|
872
|
-
gating: false,
|
|
873
826
|
resolvable: false,
|
|
874
827
|
message: 'React component "{name}" is missing prop-types.',
|
|
875
828
|
docs: 'missing-props',
|
|
@@ -887,7 +840,6 @@ export const RULE_REGISTRY = {
|
|
|
887
840
|
analyzer: 'react',
|
|
888
841
|
field: 'rule',
|
|
889
842
|
input: ['files'],
|
|
890
|
-
gating: false,
|
|
891
843
|
resolvable: false,
|
|
892
844
|
message: 'React component tree is missing an error boundary.',
|
|
893
845
|
docs: 'no-error-boundary',
|
|
@@ -906,7 +858,6 @@ export const RULE_REGISTRY = {
|
|
|
906
858
|
field: 'rule',
|
|
907
859
|
configGate: 'requireMemoization',
|
|
908
860
|
input: ['files'],
|
|
909
|
-
gating: false,
|
|
910
861
|
resolvable: false,
|
|
911
862
|
message: 'React component "{name}" is missing memoization.',
|
|
912
863
|
docs: 'performance',
|
|
@@ -924,7 +875,6 @@ export const RULE_REGISTRY = {
|
|
|
924
875
|
analyzer: 'react',
|
|
925
876
|
field: 'rule',
|
|
926
877
|
input: ['files'],
|
|
927
|
-
gating: false,
|
|
928
878
|
resolvable: false,
|
|
929
879
|
message: 'Accessibility issue in component "{name}": {issue}.',
|
|
930
880
|
docs: 'accessibility',
|
|
@@ -942,7 +892,6 @@ export const RULE_REGISTRY = {
|
|
|
942
892
|
analyzer: 'react',
|
|
943
893
|
field: 'rule',
|
|
944
894
|
input: ['files'],
|
|
945
|
-
gating: true,
|
|
946
895
|
resolvable: true,
|
|
947
896
|
message: 'raw `<{element}>` — this project uses `<{wrapper}>` ({file}).',
|
|
948
897
|
docs: 'raw-element',
|
|
@@ -965,7 +914,6 @@ export const RULE_REGISTRY = {
|
|
|
965
914
|
analyzer: 'invariants',
|
|
966
915
|
field: 'rule',
|
|
967
916
|
input: ['files'],
|
|
968
|
-
gating: false,
|
|
969
917
|
resolvable: false,
|
|
970
918
|
message: 'Invalid invariant config: {error}.',
|
|
971
919
|
docs: 'config-error',
|
|
@@ -983,7 +931,6 @@ export const RULE_REGISTRY = {
|
|
|
983
931
|
analyzer: 'invariants',
|
|
984
932
|
field: 'rule',
|
|
985
933
|
input: ['files'],
|
|
986
|
-
gating: false,
|
|
987
934
|
resolvable: false,
|
|
988
935
|
message: 'Invariant rule engine error: {error}.',
|
|
989
936
|
docs: 'engine-error',
|
|
@@ -1001,7 +948,7 @@ export const RULE_REGISTRY = {
|
|
|
1001
948
|
'field-mismatch': {
|
|
1002
949
|
analyzer: 'schema-validator',
|
|
1003
950
|
field: 'rule',
|
|
1004
|
-
|
|
951
|
+
input: ['cross-language-entities'],
|
|
1005
952
|
resolvable: false,
|
|
1006
953
|
message: 'Field mismatch: {detail}.',
|
|
1007
954
|
docs: 'field-mismatch',
|
|
@@ -1018,9 +965,9 @@ export const RULE_REGISTRY = {
|
|
|
1018
965
|
'schema-field-mismatch': {
|
|
1019
966
|
analyzer: 'schema-validator',
|
|
1020
967
|
field: 'rule',
|
|
1021
|
-
|
|
968
|
+
input: ['cross-language-entities'],
|
|
1022
969
|
resolvable: false,
|
|
1023
|
-
message: 'Schema field
|
|
970
|
+
message: 'Schema field type-name strings differ: {detail}.',
|
|
1024
971
|
docs: 'schema-field-mismatch',
|
|
1025
972
|
thresholds: [],
|
|
1026
973
|
samples: {
|
|
@@ -1035,7 +982,7 @@ export const RULE_REGISTRY = {
|
|
|
1035
982
|
'missing-field': {
|
|
1036
983
|
analyzer: 'schema-validator',
|
|
1037
984
|
field: 'rule',
|
|
1038
|
-
|
|
985
|
+
input: ['cross-language-entities'],
|
|
1039
986
|
resolvable: false,
|
|
1040
987
|
message: 'Missing field: {field}.',
|
|
1041
988
|
docs: 'missing-field',
|
|
@@ -1052,7 +999,7 @@ export const RULE_REGISTRY = {
|
|
|
1052
999
|
'extra-field': {
|
|
1053
1000
|
analyzer: 'schema-validator',
|
|
1054
1001
|
field: 'rule',
|
|
1055
|
-
|
|
1002
|
+
input: ['cross-language-entities'],
|
|
1056
1003
|
resolvable: false,
|
|
1057
1004
|
message: 'Extra field: {field}.',
|
|
1058
1005
|
docs: 'extra-field',
|
|
@@ -1069,7 +1016,7 @@ export const RULE_REGISTRY = {
|
|
|
1069
1016
|
'constraint-mismatch': {
|
|
1070
1017
|
analyzer: 'schema-validator',
|
|
1071
1018
|
field: 'rule',
|
|
1072
|
-
|
|
1019
|
+
input: ['cross-language-entities'],
|
|
1073
1020
|
resolvable: false,
|
|
1074
1021
|
message: 'Constraint mismatch: {detail}.',
|
|
1075
1022
|
docs: 'constraint-mismatch',
|
|
@@ -1086,7 +1033,7 @@ export const RULE_REGISTRY = {
|
|
|
1086
1033
|
'version-mismatch': {
|
|
1087
1034
|
analyzer: 'schema-validator',
|
|
1088
1035
|
field: 'rule',
|
|
1089
|
-
|
|
1036
|
+
input: ['cross-language-entities'],
|
|
1090
1037
|
resolvable: false,
|
|
1091
1038
|
message: 'Version mismatch: {detail}.',
|
|
1092
1039
|
docs: 'version-mismatch',
|
|
@@ -1104,7 +1051,7 @@ export const RULE_REGISTRY = {
|
|
|
1104
1051
|
'api-type-mismatch': {
|
|
1105
1052
|
analyzer: 'api-contract',
|
|
1106
1053
|
field: 'rule',
|
|
1107
|
-
|
|
1054
|
+
input: ['cross-language-entities'],
|
|
1108
1055
|
resolvable: false,
|
|
1109
1056
|
message: 'API type mismatch: {detail}.',
|
|
1110
1057
|
docs: 'api-type-mismatch',
|
|
@@ -1121,7 +1068,7 @@ export const RULE_REGISTRY = {
|
|
|
1121
1068
|
'missing-endpoint': {
|
|
1122
1069
|
analyzer: 'api-contract',
|
|
1123
1070
|
field: 'rule',
|
|
1124
|
-
|
|
1071
|
+
input: ['cross-language-entities'],
|
|
1125
1072
|
resolvable: false,
|
|
1126
1073
|
message: 'Missing API endpoint: {endpoint}.',
|
|
1127
1074
|
docs: 'missing-endpoint',
|
|
@@ -1138,7 +1085,7 @@ export const RULE_REGISTRY = {
|
|
|
1138
1085
|
'api-extra-field': {
|
|
1139
1086
|
analyzer: 'api-contract',
|
|
1140
1087
|
field: 'rule',
|
|
1141
|
-
|
|
1088
|
+
input: ['cross-language-entities'],
|
|
1142
1089
|
resolvable: false,
|
|
1143
1090
|
message: 'Extra field in API response: {field}.',
|
|
1144
1091
|
docs: 'api-extra-field',
|
|
@@ -1155,7 +1102,7 @@ export const RULE_REGISTRY = {
|
|
|
1155
1102
|
'api-missing-field': {
|
|
1156
1103
|
analyzer: 'api-contract',
|
|
1157
1104
|
field: 'rule',
|
|
1158
|
-
|
|
1105
|
+
input: ['cross-language-entities'],
|
|
1159
1106
|
resolvable: false,
|
|
1160
1107
|
message: 'Missing field in API response: {field}.',
|
|
1161
1108
|
docs: 'api-missing-field',
|
|
@@ -1172,7 +1119,7 @@ export const RULE_REGISTRY = {
|
|
|
1172
1119
|
'method-mismatch': {
|
|
1173
1120
|
analyzer: 'api-contract',
|
|
1174
1121
|
field: 'rule',
|
|
1175
|
-
|
|
1122
|
+
input: ['cross-language-entities'],
|
|
1176
1123
|
resolvable: false,
|
|
1177
1124
|
message: 'HTTP method mismatch: {detail}.',
|
|
1178
1125
|
docs: 'method-mismatch',
|
|
@@ -1189,7 +1136,7 @@ export const RULE_REGISTRY = {
|
|
|
1189
1136
|
'auth-mismatch': {
|
|
1190
1137
|
analyzer: 'api-contract',
|
|
1191
1138
|
field: 'rule',
|
|
1192
|
-
|
|
1139
|
+
input: ['cross-language-entities'],
|
|
1193
1140
|
resolvable: false,
|
|
1194
1141
|
message: 'Authentication mismatch: {detail}.',
|
|
1195
1142
|
docs: 'auth-mismatch',
|
|
@@ -1207,7 +1154,7 @@ export const RULE_REGISTRY = {
|
|
|
1207
1154
|
'circular-dependency': {
|
|
1208
1155
|
analyzer: 'dependency-graph',
|
|
1209
1156
|
field: 'type',
|
|
1210
|
-
|
|
1157
|
+
input: ['cross-language-entities'],
|
|
1211
1158
|
resolvable: false,
|
|
1212
1159
|
message: 'Circular dependency detected: {cycle}.',
|
|
1213
1160
|
docs: 'circular-dependency',
|
|
@@ -1224,7 +1171,7 @@ export const RULE_REGISTRY = {
|
|
|
1224
1171
|
'break-cycles': {
|
|
1225
1172
|
analyzer: 'dependency-graph',
|
|
1226
1173
|
field: 'type',
|
|
1227
|
-
|
|
1174
|
+
input: ['cross-language-entities'],
|
|
1228
1175
|
resolvable: false,
|
|
1229
1176
|
message: 'Break dependency cycle: {cycle}.',
|
|
1230
1177
|
docs: 'break-cycles',
|
|
@@ -1241,7 +1188,7 @@ export const RULE_REGISTRY = {
|
|
|
1241
1188
|
'tight-coupling': {
|
|
1242
1189
|
analyzer: 'dependency-graph',
|
|
1243
1190
|
field: 'type',
|
|
1244
|
-
|
|
1191
|
+
input: ['cross-language-entities'],
|
|
1245
1192
|
resolvable: false,
|
|
1246
1193
|
message: 'Tight coupling detected between {a} and {b}.',
|
|
1247
1194
|
docs: 'tight-coupling',
|
|
@@ -1258,7 +1205,7 @@ export const RULE_REGISTRY = {
|
|
|
1258
1205
|
'reduce-coupling': {
|
|
1259
1206
|
analyzer: 'dependency-graph',
|
|
1260
1207
|
field: 'type',
|
|
1261
|
-
|
|
1208
|
+
input: ['cross-language-entities'],
|
|
1262
1209
|
resolvable: false,
|
|
1263
1210
|
message: 'Reduce coupling between {a} and {b}.',
|
|
1264
1211
|
docs: 'reduce-coupling',
|
|
@@ -1275,7 +1222,7 @@ export const RULE_REGISTRY = {
|
|
|
1275
1222
|
'hub-nodes': {
|
|
1276
1223
|
analyzer: 'dependency-graph',
|
|
1277
1224
|
field: 'type',
|
|
1278
|
-
|
|
1225
|
+
input: ['cross-language-entities'],
|
|
1279
1226
|
resolvable: false,
|
|
1280
1227
|
message: 'Hub node "{node}" has {count} dependencies.',
|
|
1281
1228
|
docs: 'hub-nodes',
|
|
@@ -1292,7 +1239,7 @@ export const RULE_REGISTRY = {
|
|
|
1292
1239
|
'split-responsibilities': {
|
|
1293
1240
|
analyzer: 'dependency-graph',
|
|
1294
1241
|
field: 'type',
|
|
1295
|
-
|
|
1242
|
+
input: ['cross-language-entities'],
|
|
1296
1243
|
resolvable: false,
|
|
1297
1244
|
message: 'Split responsibilities of node "{node}".',
|
|
1298
1245
|
docs: 'split-responsibilities',
|
|
@@ -1309,7 +1256,7 @@ export const RULE_REGISTRY = {
|
|
|
1309
1256
|
'orphaned-nodes': {
|
|
1310
1257
|
analyzer: 'dependency-graph',
|
|
1311
1258
|
field: 'type',
|
|
1312
|
-
|
|
1259
|
+
input: ['cross-language-entities'],
|
|
1313
1260
|
resolvable: false,
|
|
1314
1261
|
message: 'Orphaned node "{node}" has no connections.',
|
|
1315
1262
|
docs: 'orphaned-nodes',
|
|
@@ -1326,7 +1273,7 @@ export const RULE_REGISTRY = {
|
|
|
1326
1273
|
'review-orphans': {
|
|
1327
1274
|
analyzer: 'dependency-graph',
|
|
1328
1275
|
field: 'type',
|
|
1329
|
-
|
|
1276
|
+
input: ['cross-language-entities'],
|
|
1330
1277
|
resolvable: false,
|
|
1331
1278
|
message: 'Review orphaned nodes: {nodes}.',
|
|
1332
1279
|
docs: 'review-orphans',
|
|
@@ -1345,7 +1292,6 @@ export const RULE_REGISTRY = {
|
|
|
1345
1292
|
analyzer: 'styles',
|
|
1346
1293
|
field: 'rule',
|
|
1347
1294
|
input: ['styles-css'],
|
|
1348
|
-
gating: false,
|
|
1349
1295
|
resolvable: false,
|
|
1350
1296
|
message: 'Color value "{value}" drifts from the dominant token.',
|
|
1351
1297
|
docs: 'styles/value-drift',
|
|
@@ -1363,7 +1309,6 @@ export const RULE_REGISTRY = {
|
|
|
1363
1309
|
analyzer: 'styles',
|
|
1364
1310
|
field: 'rule',
|
|
1365
1311
|
input: ['styles-css'],
|
|
1366
|
-
gating: false,
|
|
1367
1312
|
resolvable: false,
|
|
1368
1313
|
message: 'Value "{value}" is off the project\'s design scale.',
|
|
1369
1314
|
docs: 'styles/off-scale',
|
|
@@ -1381,7 +1326,6 @@ export const RULE_REGISTRY = {
|
|
|
1381
1326
|
analyzer: 'styles',
|
|
1382
1327
|
field: 'rule',
|
|
1383
1328
|
input: ['styles-css'],
|
|
1384
|
-
gating: true,
|
|
1385
1329
|
resolvable: true,
|
|
1386
1330
|
message: 'Undefined CSS class: "{class}" has no matching definition.',
|
|
1387
1331
|
docs: 'styles/undefined-class',
|
|
@@ -1402,7 +1346,6 @@ export const RULE_REGISTRY = {
|
|
|
1402
1346
|
analyzer: 'styles',
|
|
1403
1347
|
field: 'rule',
|
|
1404
1348
|
input: ['styles-css'],
|
|
1405
|
-
gating: false,
|
|
1406
1349
|
resolvable: false,
|
|
1407
1350
|
message: 'Undefined-class detection skipped: {reason}.',
|
|
1408
1351
|
docs: 'styles/undefined-class-disabled',
|
|
@@ -1420,7 +1363,6 @@ export const RULE_REGISTRY = {
|
|
|
1420
1363
|
analyzer: 'styles',
|
|
1421
1364
|
field: 'rule',
|
|
1422
1365
|
input: ['styles-css'],
|
|
1423
|
-
gating: false,
|
|
1424
1366
|
resolvable: false,
|
|
1425
1367
|
message: 'Token bypass: raw value "{value}" used instead of a design token.',
|
|
1426
1368
|
docs: 'styles/token-bypass',
|
|
@@ -1438,7 +1380,6 @@ export const RULE_REGISTRY = {
|
|
|
1438
1380
|
analyzer: 'styles',
|
|
1439
1381
|
field: 'rule',
|
|
1440
1382
|
input: ['styles-css'],
|
|
1441
|
-
gating: false,
|
|
1442
1383
|
resolvable: false,
|
|
1443
1384
|
message: 'Styling mechanism fragmented across {count} mechanisms.',
|
|
1444
1385
|
docs: 'styles/mechanism-fragmentation',
|
|
@@ -1456,7 +1397,6 @@ export const RULE_REGISTRY = {
|
|
|
1456
1397
|
analyzer: 'styles',
|
|
1457
1398
|
field: 'rule',
|
|
1458
1399
|
input: ['styles-css'],
|
|
1459
|
-
gating: false,
|
|
1460
1400
|
resolvable: false,
|
|
1461
1401
|
message: 'Mixing styling mechanisms in one file.',
|
|
1462
1402
|
docs: 'styles/mechanism-mixing',
|
|
@@ -1474,7 +1414,6 @@ export const RULE_REGISTRY = {
|
|
|
1474
1414
|
analyzer: 'styles',
|
|
1475
1415
|
field: 'rule',
|
|
1476
1416
|
input: ['styles-css'],
|
|
1477
|
-
gating: false,
|
|
1478
1417
|
resolvable: false,
|
|
1479
1418
|
message: 'Declaration set similar to another block ({similarity}%).',
|
|
1480
1419
|
docs: 'styles/declaration-set-similarity',
|
|
@@ -1492,7 +1431,6 @@ export const RULE_REGISTRY = {
|
|
|
1492
1431
|
analyzer: 'styles',
|
|
1493
1432
|
field: 'rule',
|
|
1494
1433
|
input: ['styles-css'],
|
|
1495
|
-
gating: false,
|
|
1496
1434
|
resolvable: false,
|
|
1497
1435
|
message: 'Z-index sprawl: {count} distinct z-index values.',
|
|
1498
1436
|
docs: 'styles/z-index-sprawl',
|
|
@@ -1510,7 +1448,6 @@ export const RULE_REGISTRY = {
|
|
|
1510
1448
|
analyzer: 'styles',
|
|
1511
1449
|
field: 'rule',
|
|
1512
1450
|
input: ['styles-css'],
|
|
1513
|
-
gating: false,
|
|
1514
1451
|
resolvable: false,
|
|
1515
1452
|
message: 'Z-index value "{value}" appears only once.',
|
|
1516
1453
|
docs: 'styles/z-index-singleton',
|
|
@@ -1529,7 +1466,6 @@ export const RULE_REGISTRY = {
|
|
|
1529
1466
|
analyzer: 'conventions',
|
|
1530
1467
|
field: 'rule',
|
|
1531
1468
|
input: ['function-index'],
|
|
1532
|
-
gating: true,
|
|
1533
1469
|
resolvable: true,
|
|
1534
1470
|
message: '{pct}% of `{antecedent}` callers also call `{consequent}`.',
|
|
1535
1471
|
docs: 'conventions/usage-pair',
|
|
@@ -1550,7 +1486,6 @@ export const RULE_REGISTRY = {
|
|
|
1550
1486
|
analyzer: 'conventions',
|
|
1551
1487
|
field: 'rule',
|
|
1552
1488
|
input: ['function-index'],
|
|
1553
|
-
gating: false,
|
|
1554
1489
|
resolvable: false,
|
|
1555
1490
|
message: 'Import form mismatch: use {form} for "{source}".',
|
|
1556
1491
|
docs: 'conventions/import-form',
|
|
@@ -1568,7 +1503,6 @@ export const RULE_REGISTRY = {
|
|
|
1568
1503
|
analyzer: 'conventions',
|
|
1569
1504
|
field: 'rule',
|
|
1570
1505
|
input: ['function-index'],
|
|
1571
|
-
gating: false,
|
|
1572
1506
|
resolvable: false,
|
|
1573
1507
|
message: 'Error-handling convention mismatch: {detail}.',
|
|
1574
1508
|
docs: 'conventions/error-handling',
|
|
@@ -1586,7 +1520,6 @@ export const RULE_REGISTRY = {
|
|
|
1586
1520
|
analyzer: 'conventions',
|
|
1587
1521
|
field: 'rule',
|
|
1588
1522
|
input: ['function-index'],
|
|
1589
|
-
gating: false,
|
|
1590
1523
|
resolvable: false,
|
|
1591
1524
|
message: 'Export shape mismatch: {detail}.',
|
|
1592
1525
|
docs: 'conventions/export-shape',
|
|
@@ -1604,7 +1537,6 @@ export const RULE_REGISTRY = {
|
|
|
1604
1537
|
analyzer: 'conventions',
|
|
1605
1538
|
field: 'rule',
|
|
1606
1539
|
input: ['function-index'],
|
|
1607
|
-
gating: false,
|
|
1608
1540
|
resolvable: false,
|
|
1609
1541
|
message: 'Naming convention mismatch: {detail}.',
|
|
1610
1542
|
docs: 'conventions/naming',
|
|
@@ -1623,7 +1555,6 @@ export const RULE_REGISTRY = {
|
|
|
1623
1555
|
analyzer: 'cross-domain',
|
|
1624
1556
|
field: 'rule',
|
|
1625
1557
|
input: ['schema_usage', 'functions'],
|
|
1626
|
-
gating: false,
|
|
1627
1558
|
resolvable: false,
|
|
1628
1559
|
message: 'Table "{table}" is written but never read.',
|
|
1629
1560
|
docs: 'cross-domain/written-never-read',
|
|
@@ -1641,7 +1572,6 @@ export const RULE_REGISTRY = {
|
|
|
1641
1572
|
analyzer: 'cross-domain',
|
|
1642
1573
|
field: 'rule',
|
|
1643
1574
|
input: ['schema_usage', 'functions'],
|
|
1644
|
-
gating: false,
|
|
1645
1575
|
resolvable: false,
|
|
1646
1576
|
message: 'Table "{table}" is read but never written.',
|
|
1647
1577
|
docs: 'cross-domain/read-never-written',
|
|
@@ -1659,7 +1589,6 @@ export const RULE_REGISTRY = {
|
|
|
1659
1589
|
analyzer: 'cross-domain',
|
|
1660
1590
|
field: 'rule',
|
|
1661
1591
|
input: ['schema_usage', 'functions'],
|
|
1662
|
-
gating: false,
|
|
1663
1592
|
resolvable: false,
|
|
1664
1593
|
message: 'Transaction boundary spans {count} tables.',
|
|
1665
1594
|
docs: 'cross-domain/transaction-boundary',
|
|
@@ -1677,7 +1606,6 @@ export const RULE_REGISTRY = {
|
|
|
1677
1606
|
analyzer: 'cross-domain',
|
|
1678
1607
|
field: 'rule',
|
|
1679
1608
|
input: ['schema_usage', 'functions'],
|
|
1680
|
-
gating: false,
|
|
1681
1609
|
resolvable: false,
|
|
1682
1610
|
message: 'Validation bypass: {detail}.',
|
|
1683
1611
|
docs: 'cross-domain/validation-bypass',
|
|
@@ -1695,7 +1623,6 @@ export const RULE_REGISTRY = {
|
|
|
1695
1623
|
analyzer: 'cross-domain',
|
|
1696
1624
|
field: 'rule',
|
|
1697
1625
|
input: ['schema_usage', 'functions'],
|
|
1698
|
-
gating: false,
|
|
1699
1626
|
resolvable: false,
|
|
1700
1627
|
message: 'Uncovered risk: {detail}.',
|
|
1701
1628
|
docs: 'cross-domain/uncovered-risk',
|
|
@@ -1710,17 +1637,48 @@ export const RULE_REGISTRY = {
|
|
|
1710
1637
|
},
|
|
1711
1638
|
},
|
|
1712
1639
|
};
|
|
1640
|
+
/**
|
|
1641
|
+
* Canonical set of every analyzer ID that emits at least one rule in
|
|
1642
|
+
* {@link RULE_REGISTRY}, derived from the registry itself. An analyzer "exists"
|
|
1643
|
+
* iff it emits a rule, so this is the single source of truth for analyzer
|
|
1644
|
+
* identity.
|
|
1645
|
+
*
|
|
1646
|
+
* Every other analyzer list — the audit-runner registry, config validation,
|
|
1647
|
+
* default-enabled analyzers, the detached runner, and the MCP default set —
|
|
1648
|
+
* must derive from this rather than re-type names. Adding an analyzer is then a
|
|
1649
|
+
* registry edit plus an enable decision, never a hunt across hand-maintained
|
|
1650
|
+
* arrays that drift out of sync (the historical failure: four lists at 13, 10,
|
|
1651
|
+
* 10, and 7).
|
|
1652
|
+
*/
|
|
1653
|
+
export const ALL_ANALYZERS = [
|
|
1654
|
+
...new Set(Object.values(RULE_REGISTRY).map((e) => e.analyzer)),
|
|
1655
|
+
].sort();
|
|
1656
|
+
/**
|
|
1657
|
+
* The reduced analyzer set the MCP `audit.run` surface enables by default —
|
|
1658
|
+
* a deliberate subset of {@link ALL_ANALYZERS} (the MCP path favors a lighter,
|
|
1659
|
+
* latency-sensitive audit). The full CLI `audit` default is {@link ALL_ANALYZERS}.
|
|
1660
|
+
* Referenced here so mcp.ts and mcp-tools-shared.ts don't each re-type the list.
|
|
1661
|
+
*/
|
|
1662
|
+
export const MCP_DEFAULT_ANALYZERS = [
|
|
1663
|
+
'solid',
|
|
1664
|
+
'dry',
|
|
1665
|
+
'documentation',
|
|
1666
|
+
'react',
|
|
1667
|
+
'data-access',
|
|
1668
|
+
];
|
|
1713
1669
|
/**
|
|
1714
1670
|
* Resolve a violation to its canonical {@link RuleRegistryEntry}, if any.
|
|
1715
1671
|
*
|
|
1716
1672
|
* The registry records which field on the Violation carries the rule ID
|
|
1717
1673
|
* (`field` — `rule` for almost every analyzer, `type` for dependency-graph).
|
|
1718
1674
|
* This helper reads that field off the violation and matches it against the
|
|
1719
|
-
* registry key, so gate
|
|
1675
|
+
* registry key, so the gate's resolution-gap detection (Spec 45 R1) never
|
|
1676
|
+
* hard-codes a field.
|
|
1720
1677
|
*
|
|
1721
1678
|
* Invariant violations (user-defined rule IDs) have no registry entry and
|
|
1722
|
-
* return `undefined
|
|
1723
|
-
*
|
|
1679
|
+
* return `undefined`. They still gate (Spec 45 R1) — the gate blocks on every
|
|
1680
|
+
* finding at a blocking severity; the registry only determines whether a
|
|
1681
|
+
* missing resolution is a recorded gap.
|
|
1724
1682
|
*/
|
|
1725
1683
|
export function getViolationRuleEntry(v) {
|
|
1726
1684
|
if (!v.analyzer)
|