@corbat-tech/coding-standards-mcp 1.1.0 → 2.0.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/README.md +110 -26
- package/dist/analysis/code-analyzer.d.ts +44 -0
- package/dist/analysis/code-analyzer.d.ts.map +1 -0
- package/dist/analysis/code-analyzer.js +528 -0
- package/dist/analysis/code-analyzer.js.map +1 -0
- package/dist/tools/definitions.d.ts +40 -1
- package/dist/tools/definitions.d.ts.map +1 -1
- package/dist/tools/definitions.js +68 -10
- package/dist/tools/definitions.js.map +1 -1
- package/dist/tools/handlers/get-context.d.ts.map +1 -1
- package/dist/tools/handlers/get-context.js +115 -0
- package/dist/tools/handlers/get-context.js.map +1 -1
- package/dist/tools/handlers/index.d.ts +1 -0
- package/dist/tools/handlers/index.d.ts.map +1 -1
- package/dist/tools/handlers/index.js +1 -0
- package/dist/tools/handlers/index.js.map +1 -1
- package/dist/tools/handlers/validate.d.ts +4 -1
- package/dist/tools/handlers/validate.d.ts.map +1 -1
- package/dist/tools/handlers/validate.js +37 -42
- package/dist/tools/handlers/validate.js.map +1 -1
- package/dist/tools/handlers/verify.d.ts +38 -0
- package/dist/tools/handlers/verify.d.ts.map +1 -0
- package/dist/tools/handlers/verify.js +172 -0
- package/dist/tools/handlers/verify.js.map +1 -0
- package/dist/tools/index.d.ts.map +1 -1
- package/dist/tools/index.js +5 -2
- package/dist/tools/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -0,0 +1,528 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Lightweight code analyzer using regex and heuristics.
|
|
3
|
+
* No AST parsing to keep it fast and dependency-free.
|
|
4
|
+
*
|
|
5
|
+
* This module provides real code analysis instead of just returning checklists.
|
|
6
|
+
* It detects anti-patterns, measures code quality metrics, and provides
|
|
7
|
+
* actionable feedback.
|
|
8
|
+
*/
|
|
9
|
+
// Anti-patterns to detect with their severity and suggestions
|
|
10
|
+
const ANTI_PATTERNS = [
|
|
11
|
+
// Critical issues
|
|
12
|
+
{
|
|
13
|
+
pattern: /catch\s*\(\s*\w*\s*\)\s*\{\s*\}/g,
|
|
14
|
+
message: 'Empty catch block - errors are silently swallowed',
|
|
15
|
+
rule: 'no-empty-catch',
|
|
16
|
+
type: 'CRITICAL',
|
|
17
|
+
suggestion: 'Handle the error, log it, or rethrow with context',
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
pattern: /(password|secret|api_key|apikey|api[-_]?secret|token|credential)\s*[:=]\s*["'][^"']{3,}["']/gi,
|
|
21
|
+
message: 'Potential hardcoded secret detected',
|
|
22
|
+
rule: 'no-hardcoded-secrets',
|
|
23
|
+
type: 'CRITICAL',
|
|
24
|
+
suggestion: 'Use environment variables or a secrets manager',
|
|
25
|
+
},
|
|
26
|
+
{
|
|
27
|
+
pattern: /eval\s*\(/g,
|
|
28
|
+
message: 'eval() is dangerous and can lead to code injection',
|
|
29
|
+
rule: 'no-eval',
|
|
30
|
+
type: 'CRITICAL',
|
|
31
|
+
suggestion: 'Use safer alternatives like JSON.parse() or specific parsers',
|
|
32
|
+
},
|
|
33
|
+
{
|
|
34
|
+
pattern: /innerHTML\s*=/g,
|
|
35
|
+
message: 'innerHTML can lead to XSS vulnerabilities',
|
|
36
|
+
rule: 'no-inner-html',
|
|
37
|
+
type: 'CRITICAL',
|
|
38
|
+
suggestion: 'Use textContent or sanitize HTML before insertion',
|
|
39
|
+
},
|
|
40
|
+
// Warnings
|
|
41
|
+
{
|
|
42
|
+
pattern: /catch\s*\(\s*(Exception|Error|Throwable|any|unknown)\s+\w+\s*\)/gi,
|
|
43
|
+
message: 'Generic exception catch - use specific error types',
|
|
44
|
+
rule: 'no-generic-catch',
|
|
45
|
+
type: 'WARNING',
|
|
46
|
+
suggestion: 'Catch specific error types for proper error handling',
|
|
47
|
+
},
|
|
48
|
+
{
|
|
49
|
+
pattern: /new\s+Date\(\s*\)/g,
|
|
50
|
+
message: 'Hardcoded current time - not testable',
|
|
51
|
+
rule: 'no-hardcoded-time',
|
|
52
|
+
type: 'WARNING',
|
|
53
|
+
suggestion: 'Inject a Clock/TimeProvider for testability',
|
|
54
|
+
},
|
|
55
|
+
{
|
|
56
|
+
pattern: /console\.(log|error|warn|info|debug|trace)\s*\(/g,
|
|
57
|
+
message: 'Console statement found',
|
|
58
|
+
rule: 'no-console',
|
|
59
|
+
type: 'WARNING',
|
|
60
|
+
suggestion: 'Use a proper logging framework in production code',
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
pattern: /System\.(out|err)\.(print|println)/g,
|
|
64
|
+
message: 'System.out/err usage - use proper logging',
|
|
65
|
+
rule: 'no-system-out',
|
|
66
|
+
type: 'WARNING',
|
|
67
|
+
suggestion: 'Use SLF4J, Log4j, or another logging framework',
|
|
68
|
+
},
|
|
69
|
+
{
|
|
70
|
+
pattern: /@Autowired\s+(private|protected)/g,
|
|
71
|
+
message: 'Field injection - harder to test',
|
|
72
|
+
rule: 'no-field-injection',
|
|
73
|
+
type: 'WARNING',
|
|
74
|
+
suggestion: 'Use constructor injection instead',
|
|
75
|
+
},
|
|
76
|
+
{
|
|
77
|
+
pattern: /:\s*any\b(?!\s*\()/g,
|
|
78
|
+
message: 'TypeScript "any" type - loses type safety',
|
|
79
|
+
rule: 'no-any-type',
|
|
80
|
+
type: 'WARNING',
|
|
81
|
+
suggestion: 'Use specific types or unknown with type guards',
|
|
82
|
+
},
|
|
83
|
+
{
|
|
84
|
+
pattern: /==(?!=)/g,
|
|
85
|
+
message: 'Loose equality operator',
|
|
86
|
+
rule: 'strict-equality',
|
|
87
|
+
type: 'WARNING',
|
|
88
|
+
suggestion: 'Use === for strict comparison',
|
|
89
|
+
},
|
|
90
|
+
{
|
|
91
|
+
pattern: /!=(?!=)/g,
|
|
92
|
+
message: 'Loose inequality operator',
|
|
93
|
+
rule: 'strict-inequality',
|
|
94
|
+
type: 'WARNING',
|
|
95
|
+
suggestion: 'Use !== for strict comparison',
|
|
96
|
+
},
|
|
97
|
+
{
|
|
98
|
+
pattern: /public\s+\w+\s+\w+\s*;(?!\s*\/\/.*final|static)/g,
|
|
99
|
+
message: 'Public mutable field - breaks encapsulation',
|
|
100
|
+
rule: 'no-public-fields',
|
|
101
|
+
type: 'WARNING',
|
|
102
|
+
suggestion: 'Use private fields with getters/setters or records',
|
|
103
|
+
},
|
|
104
|
+
{
|
|
105
|
+
pattern: /throw\s+new\s+(Error|Exception)\s*\(\s*["'][^"']*["']\s*\)/g,
|
|
106
|
+
message: 'Generic error thrown - use custom error types',
|
|
107
|
+
rule: 'no-generic-throw',
|
|
108
|
+
type: 'WARNING',
|
|
109
|
+
suggestion: 'Create specific error classes for different failure modes',
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
pattern: /\.then\s*\([^)]*\)\s*(?!\.catch|\.finally)/g,
|
|
113
|
+
message: 'Promise without error handling',
|
|
114
|
+
rule: 'unhandled-promise',
|
|
115
|
+
type: 'WARNING',
|
|
116
|
+
suggestion: 'Add .catch() or use try/catch with async/await',
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
pattern: /setTimeout\s*\(\s*[^,]+,\s*0\s*\)/g,
|
|
120
|
+
message: 'setTimeout with 0ms - likely a hack',
|
|
121
|
+
rule: 'no-settimeout-zero',
|
|
122
|
+
type: 'WARNING',
|
|
123
|
+
suggestion: 'Use queueMicrotask() or review the async flow',
|
|
124
|
+
},
|
|
125
|
+
{
|
|
126
|
+
pattern: /magic\s*number|[^a-zA-Z](?:86400|3600|60000|1000)\b/gi,
|
|
127
|
+
message: 'Magic number detected - use named constants',
|
|
128
|
+
rule: 'no-magic-numbers',
|
|
129
|
+
type: 'WARNING',
|
|
130
|
+
suggestion: 'Extract to named constants (e.g., SECONDS_PER_DAY)',
|
|
131
|
+
},
|
|
132
|
+
// Info
|
|
133
|
+
{
|
|
134
|
+
pattern: /TODO|FIXME|HACK|XXX|BUG/g,
|
|
135
|
+
message: 'Unresolved TODO/FIXME comment',
|
|
136
|
+
rule: 'no-todo',
|
|
137
|
+
type: 'INFO',
|
|
138
|
+
suggestion: 'Track these in an issue tracker instead',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
pattern: /@deprecated/gi,
|
|
142
|
+
message: 'Deprecated code usage',
|
|
143
|
+
rule: 'deprecated-usage',
|
|
144
|
+
type: 'INFO',
|
|
145
|
+
suggestion: 'Update to use the recommended alternative',
|
|
146
|
+
},
|
|
147
|
+
{
|
|
148
|
+
pattern: /\bvar\s+/g,
|
|
149
|
+
message: '"var" keyword used',
|
|
150
|
+
rule: 'no-var',
|
|
151
|
+
type: 'INFO',
|
|
152
|
+
suggestion: 'Use const or let instead for better scoping',
|
|
153
|
+
},
|
|
154
|
+
];
|
|
155
|
+
// Good practices to detect (presence = positive contribution to score)
|
|
156
|
+
const GOOD_PRACTICES = [
|
|
157
|
+
{ pattern: /interface\s+\w+/g, name: 'interfaces', weight: 10 },
|
|
158
|
+
{ pattern: /type\s+\w+\s*=/g, name: 'type_aliases', weight: 5 },
|
|
159
|
+
{ pattern: /@Test|describe\s*\(|it\s*\(|test\s*\(|#\[test\]/g, name: 'tests', weight: 15 },
|
|
160
|
+
{ pattern: /class\s+\w*Error|class\s+\w*Exception|struct\s+\w*Error/g, name: 'custom_errors', weight: 10 },
|
|
161
|
+
{ pattern: /constructor\s*\([^)]*(?:private|readonly|protected)/g, name: 'constructor_injection', weight: 10 },
|
|
162
|
+
{ pattern: /implements\s+\w+/g, name: 'implements_interface', weight: 8 },
|
|
163
|
+
{ pattern: /readonly\s+|final\s+|const\s+\w+:/g, name: 'immutability', weight: 5 },
|
|
164
|
+
{ pattern: /@Injectable|@Service|@Component|@Repository/g, name: 'di_annotations', weight: 5 },
|
|
165
|
+
{ pattern: /async\s+\w+|Promise\s*</g, name: 'async_handling', weight: 3 },
|
|
166
|
+
{ pattern: /expect\s*\(|assert|should\.|toBe|toEqual|toHaveBeenCalled/g, name: 'assertions', weight: 5 },
|
|
167
|
+
{ pattern: /@BeforeEach|@AfterEach|beforeEach|afterEach|setUp|tearDown/g, name: 'test_setup', weight: 3 },
|
|
168
|
+
{ pattern: /private\s+readonly|private\s+final/g, name: 'encapsulation', weight: 5 },
|
|
169
|
+
{ pattern: /Result<|Either<|Option<|Maybe</g, name: 'result_types', weight: 8 },
|
|
170
|
+
{ pattern: /\.map\s*\(|\.filter\s*\(|\.reduce\s*\(/g, name: 'functional_style', weight: 3 },
|
|
171
|
+
];
|
|
172
|
+
/**
|
|
173
|
+
* Analyze code and return issues, metrics, and score.
|
|
174
|
+
*/
|
|
175
|
+
export function analyzeCode(code) {
|
|
176
|
+
const lines = code.split('\n');
|
|
177
|
+
const issues = [];
|
|
178
|
+
// 1. Detect anti-patterns
|
|
179
|
+
for (const ap of ANTI_PATTERNS) {
|
|
180
|
+
const regex = new RegExp(ap.pattern.source, ap.pattern.flags);
|
|
181
|
+
let match = regex.exec(code);
|
|
182
|
+
while (match !== null) {
|
|
183
|
+
const lineNum = code.substring(0, match.index).split('\n').length;
|
|
184
|
+
// Avoid duplicate issues at the same line for the same rule
|
|
185
|
+
const existingIssue = issues.find((i) => i.rule === ap.rule && i.line === lineNum);
|
|
186
|
+
if (!existingIssue) {
|
|
187
|
+
issues.push({
|
|
188
|
+
type: ap.type,
|
|
189
|
+
rule: ap.rule,
|
|
190
|
+
message: ap.message,
|
|
191
|
+
line: lineNum,
|
|
192
|
+
suggestion: ap.suggestion,
|
|
193
|
+
});
|
|
194
|
+
}
|
|
195
|
+
match = regex.exec(code);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
// 2. Analyze method/class lengths
|
|
199
|
+
const methodLengths = analyzeMethodLengths(code);
|
|
200
|
+
const classLengths = analyzeClassLengths(code);
|
|
201
|
+
for (const method of methodLengths) {
|
|
202
|
+
if (method.lines > 20) {
|
|
203
|
+
issues.push({
|
|
204
|
+
type: 'WARNING',
|
|
205
|
+
rule: 'max-method-lines',
|
|
206
|
+
message: `Method "${method.name}" is ${method.lines} lines (max: 20)`,
|
|
207
|
+
line: method.startLine,
|
|
208
|
+
suggestion: 'Extract smaller methods with single responsibilities',
|
|
209
|
+
});
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
for (const cls of classLengths) {
|
|
213
|
+
if (cls.lines > 200) {
|
|
214
|
+
issues.push({
|
|
215
|
+
type: 'WARNING',
|
|
216
|
+
rule: 'max-class-lines',
|
|
217
|
+
message: `Class "${cls.name}" is ${cls.lines} lines (max: 200)`,
|
|
218
|
+
line: cls.startLine,
|
|
219
|
+
suggestion: 'Split into smaller, focused classes',
|
|
220
|
+
});
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
// 3. Check for missing tests
|
|
224
|
+
const hasImplementation = /class\s+\w+|function\s+\w+|const\s+\w+\s*=\s*(?:async\s*)?\(/.test(code);
|
|
225
|
+
const hasTests = /@Test|describe\s*\(|it\s*\(|test\s*\(|#\[test\]/.test(code);
|
|
226
|
+
if (hasImplementation && !hasTests) {
|
|
227
|
+
issues.push({
|
|
228
|
+
type: 'CRITICAL',
|
|
229
|
+
rule: 'missing-tests',
|
|
230
|
+
message: 'No tests found - TDD requires tests before implementation',
|
|
231
|
+
suggestion: 'Write tests first, then implement to make them pass',
|
|
232
|
+
});
|
|
233
|
+
}
|
|
234
|
+
// 4. Check for missing interfaces (DI)
|
|
235
|
+
const hasClasses = /class\s+\w+/.test(code);
|
|
236
|
+
const hasInterfaces = /interface\s+\w+|type\s+\w+\s*=/.test(code);
|
|
237
|
+
if (hasClasses && !hasInterfaces) {
|
|
238
|
+
issues.push({
|
|
239
|
+
type: 'WARNING',
|
|
240
|
+
rule: 'missing-interfaces',
|
|
241
|
+
message: 'No interfaces found - use interfaces for dependency injection',
|
|
242
|
+
suggestion: 'Define interfaces for services and repositories to enable testing and flexibility',
|
|
243
|
+
});
|
|
244
|
+
}
|
|
245
|
+
// 5. Calculate metrics
|
|
246
|
+
const metrics = calculateMetrics(code, lines, methodLengths, classLengths);
|
|
247
|
+
// 6. Calculate score
|
|
248
|
+
const score = calculateScore(code, issues);
|
|
249
|
+
// 7. Generate summary
|
|
250
|
+
const summary = generateSummary(issues, score);
|
|
251
|
+
// 8. Determine if passed
|
|
252
|
+
const criticalCount = issues.filter((i) => i.type === 'CRITICAL').length;
|
|
253
|
+
const passed = criticalCount === 0 && score >= 60;
|
|
254
|
+
return { issues, score, summary, metrics, passed };
|
|
255
|
+
}
|
|
256
|
+
/**
|
|
257
|
+
* Analyze method lengths in the code.
|
|
258
|
+
*/
|
|
259
|
+
function analyzeMethodLengths(code) {
|
|
260
|
+
const results = [];
|
|
261
|
+
const lines = code.split('\n');
|
|
262
|
+
// Patterns for method/function declarations in various languages
|
|
263
|
+
const methodPatterns = [
|
|
264
|
+
// TypeScript/JavaScript: function name(), async function name(), name() {, async name() {
|
|
265
|
+
/(?:export\s+)?(?:async\s+)?function\s+(\w+)\s*\(/g,
|
|
266
|
+
// Method in class: public/private/protected name() or async name()
|
|
267
|
+
/(?:public|private|protected)\s+(?:static\s+)?(?:async\s+)?(\w+)\s*\([^)]*\)\s*(?::\s*[\w<>[\]|,\s]+)?\s*\{/g,
|
|
268
|
+
// Arrow function assigned to const: const name = () => or const name = async () =>
|
|
269
|
+
/(?:const|let)\s+(\w+)\s*=\s*(?:async\s*)?\([^)]*\)\s*(?::\s*[\w<>[\]|,\s]+)?\s*=>/g,
|
|
270
|
+
// Java/Kotlin: public void name(), private String name()
|
|
271
|
+
/(?:public|private|protected)\s+(?:static\s+)?(?:final\s+)?(?:\w+\s+)?(\w+)\s*\([^)]*\)\s*(?:throws\s+[\w,\s]+)?\s*\{/g,
|
|
272
|
+
// Python: def name(
|
|
273
|
+
/def\s+(\w+)\s*\([^)]*\)\s*(?:->\s*[\w[\],\s]+)?\s*:/g,
|
|
274
|
+
// Go: func name( or func (receiver) name(
|
|
275
|
+
/func\s+(?:\([^)]+\)\s+)?(\w+)\s*\([^)]*\)\s*(?:\([^)]*\)|[\w\s*]+)?\s*\{/g,
|
|
276
|
+
// Rust: fn name(
|
|
277
|
+
/fn\s+(\w+)\s*(?:<[^>]+>)?\s*\([^)]*\)\s*(?:->\s*[\w<>]+)?\s*\{/g,
|
|
278
|
+
];
|
|
279
|
+
for (const pattern of methodPatterns) {
|
|
280
|
+
const regex = new RegExp(pattern.source, pattern.flags);
|
|
281
|
+
let match = regex.exec(code);
|
|
282
|
+
while (match !== null) {
|
|
283
|
+
const startIndex = match.index;
|
|
284
|
+
const startLine = code.substring(0, startIndex).split('\n').length;
|
|
285
|
+
const methodName = match[1] || 'anonymous';
|
|
286
|
+
// Skip if we already have this method (avoid duplicates from overlapping patterns)
|
|
287
|
+
if (results.some((r) => r.startLine === startLine)) {
|
|
288
|
+
match = regex.exec(code);
|
|
289
|
+
continue;
|
|
290
|
+
}
|
|
291
|
+
// Count lines until matching closing brace
|
|
292
|
+
let braceCount = 0;
|
|
293
|
+
let endLine = startLine;
|
|
294
|
+
let started = false;
|
|
295
|
+
for (let i = startLine - 1; i < lines.length; i++) {
|
|
296
|
+
const line = lines[i];
|
|
297
|
+
// Count braces (simple approach, doesn't handle strings/comments perfectly)
|
|
298
|
+
for (const char of line) {
|
|
299
|
+
if (char === '{') {
|
|
300
|
+
braceCount++;
|
|
301
|
+
started = true;
|
|
302
|
+
}
|
|
303
|
+
if (char === '}')
|
|
304
|
+
braceCount--;
|
|
305
|
+
}
|
|
306
|
+
if (started && braceCount === 0) {
|
|
307
|
+
endLine = i + 1;
|
|
308
|
+
break;
|
|
309
|
+
}
|
|
310
|
+
}
|
|
311
|
+
const methodLines = endLine - startLine + 1;
|
|
312
|
+
if (methodLines > 1) {
|
|
313
|
+
// Only count if it's a real method, not just a declaration
|
|
314
|
+
results.push({
|
|
315
|
+
name: methodName,
|
|
316
|
+
lines: methodLines,
|
|
317
|
+
startLine,
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
match = regex.exec(code);
|
|
321
|
+
}
|
|
322
|
+
}
|
|
323
|
+
return results;
|
|
324
|
+
}
|
|
325
|
+
/**
|
|
326
|
+
* Analyze class lengths in the code.
|
|
327
|
+
*/
|
|
328
|
+
function analyzeClassLengths(code) {
|
|
329
|
+
const results = [];
|
|
330
|
+
const lines = code.split('\n');
|
|
331
|
+
// Pattern for class declarations
|
|
332
|
+
const classPattern = /(?:export\s+)?(?:abstract\s+)?class\s+(\w+)(?:\s+extends\s+\w+)?(?:\s+implements\s+[\w,\s]+)?\s*\{/g;
|
|
333
|
+
let match = classPattern.exec(code);
|
|
334
|
+
while (match !== null) {
|
|
335
|
+
const startIndex = match.index;
|
|
336
|
+
const startLine = code.substring(0, startIndex).split('\n').length;
|
|
337
|
+
const className = match[1];
|
|
338
|
+
let braceCount = 0;
|
|
339
|
+
let endLine = startLine;
|
|
340
|
+
let started = false;
|
|
341
|
+
for (let i = startLine - 1; i < lines.length; i++) {
|
|
342
|
+
const line = lines[i];
|
|
343
|
+
for (const char of line) {
|
|
344
|
+
if (char === '{') {
|
|
345
|
+
braceCount++;
|
|
346
|
+
started = true;
|
|
347
|
+
}
|
|
348
|
+
if (char === '}')
|
|
349
|
+
braceCount--;
|
|
350
|
+
}
|
|
351
|
+
if (started && braceCount === 0) {
|
|
352
|
+
endLine = i + 1;
|
|
353
|
+
break;
|
|
354
|
+
}
|
|
355
|
+
}
|
|
356
|
+
results.push({
|
|
357
|
+
name: className,
|
|
358
|
+
lines: endLine - startLine + 1,
|
|
359
|
+
startLine,
|
|
360
|
+
});
|
|
361
|
+
match = classPattern.exec(code);
|
|
362
|
+
}
|
|
363
|
+
return results;
|
|
364
|
+
}
|
|
365
|
+
/**
|
|
366
|
+
* Calculate code metrics.
|
|
367
|
+
*/
|
|
368
|
+
function calculateMetrics(code, lines, methodLengths, classLengths) {
|
|
369
|
+
// Count comment lines (simple heuristic)
|
|
370
|
+
const commentLines = lines.filter((l) => {
|
|
371
|
+
const trimmed = l.trim();
|
|
372
|
+
return (trimmed.startsWith('//') ||
|
|
373
|
+
trimmed.startsWith('/*') ||
|
|
374
|
+
trimmed.startsWith('*') ||
|
|
375
|
+
trimmed.startsWith('#') ||
|
|
376
|
+
trimmed.startsWith('"""') ||
|
|
377
|
+
trimmed.startsWith("'''"));
|
|
378
|
+
}).length;
|
|
379
|
+
// Count empty lines
|
|
380
|
+
const emptyLines = lines.filter((l) => l.trim() === '').length;
|
|
381
|
+
return {
|
|
382
|
+
totalLines: lines.length,
|
|
383
|
+
codeLines: lines.length - commentLines - emptyLines,
|
|
384
|
+
commentLines,
|
|
385
|
+
methodCount: methodLengths.length,
|
|
386
|
+
classCount: classLengths.length,
|
|
387
|
+
interfaceCount: (code.match(/interface\s+\w+/g) || []).length,
|
|
388
|
+
testCount: (code.match(/@Test|it\s*\(|test\s*\(|describe\s*\(/g) || []).length,
|
|
389
|
+
maxMethodLines: Math.max(...methodLengths.map((m) => m.lines), 0),
|
|
390
|
+
maxClassLines: Math.max(...classLengths.map((c) => c.lines), 0),
|
|
391
|
+
customErrorCount: (code.match(/class\s+\w*Error|class\s+\w*Exception/g) || []).length,
|
|
392
|
+
importCount: (code.match(/^import\s+|^from\s+\w+\s+import/gm) || []).length,
|
|
393
|
+
};
|
|
394
|
+
}
|
|
395
|
+
/**
|
|
396
|
+
* Calculate quality score based on issues and good practices.
|
|
397
|
+
*/
|
|
398
|
+
function calculateScore(code, issues) {
|
|
399
|
+
let score = 100;
|
|
400
|
+
// Deduct for issues
|
|
401
|
+
for (const issue of issues) {
|
|
402
|
+
switch (issue.type) {
|
|
403
|
+
case 'CRITICAL':
|
|
404
|
+
score -= 15;
|
|
405
|
+
break;
|
|
406
|
+
case 'WARNING':
|
|
407
|
+
score -= 5;
|
|
408
|
+
break;
|
|
409
|
+
case 'INFO':
|
|
410
|
+
score -= 1;
|
|
411
|
+
break;
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
// Add for good practices
|
|
415
|
+
for (const gp of GOOD_PRACTICES) {
|
|
416
|
+
const matches = (code.match(gp.pattern) || []).length;
|
|
417
|
+
if (matches > 0) {
|
|
418
|
+
// Add points but cap at the weight to avoid gaming
|
|
419
|
+
score += Math.min(gp.weight, matches * 2);
|
|
420
|
+
}
|
|
421
|
+
}
|
|
422
|
+
// Normalize score to 0-100 range
|
|
423
|
+
return Math.max(0, Math.min(100, score));
|
|
424
|
+
}
|
|
425
|
+
/**
|
|
426
|
+
* Generate a human-readable summary.
|
|
427
|
+
*/
|
|
428
|
+
function generateSummary(issues, score) {
|
|
429
|
+
const criticals = issues.filter((i) => i.type === 'CRITICAL').length;
|
|
430
|
+
const warnings = issues.filter((i) => i.type === 'WARNING').length;
|
|
431
|
+
if (criticals > 0) {
|
|
432
|
+
return `NEEDS WORK: ${criticals} critical issue(s) must be fixed before proceeding`;
|
|
433
|
+
}
|
|
434
|
+
if (warnings > 5) {
|
|
435
|
+
return `ACCEPTABLE: ${warnings} warnings should be addressed to improve quality`;
|
|
436
|
+
}
|
|
437
|
+
if (score >= 85) {
|
|
438
|
+
return `EXCELLENT: Code follows best practices with high quality`;
|
|
439
|
+
}
|
|
440
|
+
if (score >= 70) {
|
|
441
|
+
return `GOOD: Code follows most best practices`;
|
|
442
|
+
}
|
|
443
|
+
if (score >= 60) {
|
|
444
|
+
return `FAIR: Some improvements recommended`;
|
|
445
|
+
}
|
|
446
|
+
return `NEEDS IMPROVEMENT: Multiple issues detected that should be addressed`;
|
|
447
|
+
}
|
|
448
|
+
/**
|
|
449
|
+
* Format analysis result as markdown.
|
|
450
|
+
*/
|
|
451
|
+
export function formatAnalysisAsMarkdown(result) {
|
|
452
|
+
const lines = [];
|
|
453
|
+
// Header with summary
|
|
454
|
+
const statusEmoji = result.passed ? '✅' : '❌';
|
|
455
|
+
lines.push(`# ${statusEmoji} Code Analysis Results`, '');
|
|
456
|
+
lines.push(`**${result.summary}**`, '');
|
|
457
|
+
lines.push(`**Score: ${result.score}/100**`, '');
|
|
458
|
+
lines.push('');
|
|
459
|
+
// Metrics section
|
|
460
|
+
lines.push('---', '', '## Metrics', '');
|
|
461
|
+
lines.push(`| Metric | Value |`);
|
|
462
|
+
lines.push(`|--------|-------|`);
|
|
463
|
+
lines.push(`| Total Lines | ${result.metrics.totalLines} |`);
|
|
464
|
+
lines.push(`| Code Lines | ${result.metrics.codeLines} |`);
|
|
465
|
+
lines.push(`| Methods | ${result.metrics.methodCount} |`);
|
|
466
|
+
lines.push(`| Classes | ${result.metrics.classCount} |`);
|
|
467
|
+
lines.push(`| Interfaces | ${result.metrics.interfaceCount} |`);
|
|
468
|
+
lines.push(`| Tests | ${result.metrics.testCount} |`);
|
|
469
|
+
lines.push(`| Custom Errors | ${result.metrics.customErrorCount} |`);
|
|
470
|
+
lines.push(`| Max Method Lines | ${result.metrics.maxMethodLines} |`);
|
|
471
|
+
lines.push(`| Max Class Lines | ${result.metrics.maxClassLines} |`);
|
|
472
|
+
lines.push('');
|
|
473
|
+
// Issues by type
|
|
474
|
+
const criticals = result.issues.filter((i) => i.type === 'CRITICAL');
|
|
475
|
+
const warnings = result.issues.filter((i) => i.type === 'WARNING');
|
|
476
|
+
const infos = result.issues.filter((i) => i.type === 'INFO');
|
|
477
|
+
if (criticals.length > 0) {
|
|
478
|
+
lines.push('---', '', '## CRITICAL Issues (must fix)', '');
|
|
479
|
+
for (const issue of criticals) {
|
|
480
|
+
lines.push(`- **Line ${issue.line || '?'}:** ${issue.message}`);
|
|
481
|
+
if (issue.suggestion) {
|
|
482
|
+
lines.push(` - Suggestion: ${issue.suggestion}`);
|
|
483
|
+
}
|
|
484
|
+
}
|
|
485
|
+
lines.push('');
|
|
486
|
+
}
|
|
487
|
+
if (warnings.length > 0) {
|
|
488
|
+
lines.push('---', '', '## Warnings (should fix)', '');
|
|
489
|
+
for (const issue of warnings) {
|
|
490
|
+
lines.push(`- **Line ${issue.line || '?'}:** ${issue.message}`);
|
|
491
|
+
if (issue.suggestion) {
|
|
492
|
+
lines.push(` - Suggestion: ${issue.suggestion}`);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
lines.push('');
|
|
496
|
+
}
|
|
497
|
+
if (infos.length > 0) {
|
|
498
|
+
lines.push('---', '', '## Info', '');
|
|
499
|
+
for (const issue of infos) {
|
|
500
|
+
lines.push(`- Line ${issue.line || '?'}: ${issue.message}`);
|
|
501
|
+
}
|
|
502
|
+
lines.push('');
|
|
503
|
+
}
|
|
504
|
+
// Required actions
|
|
505
|
+
lines.push('---', '', '## Required Actions', '');
|
|
506
|
+
if (criticals.length > 0) {
|
|
507
|
+
lines.push(`1. Fix ${criticals.length} critical issue(s) - these are blocking`);
|
|
508
|
+
}
|
|
509
|
+
if (warnings.length > 3) {
|
|
510
|
+
lines.push(`2. Address ${warnings.length} warnings to improve maintainability`);
|
|
511
|
+
}
|
|
512
|
+
if (result.metrics.testCount === 0) {
|
|
513
|
+
lines.push('3. Add tests - TDD requires tests before implementation');
|
|
514
|
+
}
|
|
515
|
+
if (result.metrics.interfaceCount === 0 && result.metrics.classCount > 0) {
|
|
516
|
+
lines.push('4. Add interfaces for dependency injection');
|
|
517
|
+
}
|
|
518
|
+
if (result.passed) {
|
|
519
|
+
lines.push('');
|
|
520
|
+
lines.push('**Code meets quality standards. Ready for review.**');
|
|
521
|
+
}
|
|
522
|
+
else {
|
|
523
|
+
lines.push('');
|
|
524
|
+
lines.push('**Fix critical issues before proceeding.**');
|
|
525
|
+
}
|
|
526
|
+
return lines.join('\n');
|
|
527
|
+
}
|
|
528
|
+
//# sourceMappingURL=code-analyzer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"code-analyzer.js","sourceRoot":"","sources":["../../src/analysis/code-analyzer.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAgCH,8DAA8D;AAC9D,MAAM,aAAa,GAMd;IACH,kBAAkB;IAClB;QACE,OAAO,EAAE,kCAAkC;QAC3C,OAAO,EAAE,mDAAmD;QAC5D,IAAI,EAAE,gBAAgB;QACtB,IAAI,EAAE,UAAU;QAChB,UAAU,EAAE,mDAAmD;KAChE;IACD;QACE,OAAO,EAAE,+FAA+F;QACxG,OAA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|
|
29
31
|
query?: undefined;
|
|
30
32
|
};
|
|
31
33
|
required: string[];
|
|
@@ -47,6 +49,37 @@ export declare const tools: ({
|
|
|
47
49
|
};
|
|
48
50
|
task?: undefined;
|
|
49
51
|
project_dir?: undefined;
|
|
52
|
+
tests?: undefined;
|
|
53
|
+
interfaces?: undefined;
|
|
54
|
+
query?: undefined;
|
|
55
|
+
};
|
|
56
|
+
required: string[];
|
|
57
|
+
};
|
|
58
|
+
} | {
|
|
59
|
+
name: string;
|
|
60
|
+
description: string;
|
|
61
|
+
inputSchema: {
|
|
62
|
+
type: "object";
|
|
63
|
+
properties: {
|
|
64
|
+
code: {
|
|
65
|
+
type: string;
|
|
66
|
+
description: string;
|
|
67
|
+
};
|
|
68
|
+
tests: {
|
|
69
|
+
type: string;
|
|
70
|
+
description: string;
|
|
71
|
+
};
|
|
72
|
+
interfaces: {
|
|
73
|
+
type: string;
|
|
74
|
+
description: string;
|
|
75
|
+
};
|
|
76
|
+
task_type: {
|
|
77
|
+
type: string;
|
|
78
|
+
enum: string[];
|
|
79
|
+
description: string;
|
|
80
|
+
};
|
|
81
|
+
task?: undefined;
|
|
82
|
+
project_dir?: undefined;
|
|
50
83
|
query?: undefined;
|
|
51
84
|
};
|
|
52
85
|
required: string[];
|
|
@@ -65,6 +98,8 @@ export declare const tools: ({
|
|
|
65
98
|
project_dir?: undefined;
|
|
66
99
|
code?: undefined;
|
|
67
100
|
task_type?: undefined;
|
|
101
|
+
tests?: undefined;
|
|
102
|
+
interfaces?: undefined;
|
|
68
103
|
};
|
|
69
104
|
required: string[];
|
|
70
105
|
};
|
|
@@ -78,6 +113,8 @@ export declare const tools: ({
|
|
|
78
113
|
project_dir?: undefined;
|
|
79
114
|
code?: undefined;
|
|
80
115
|
task_type?: undefined;
|
|
116
|
+
tests?: undefined;
|
|
117
|
+
interfaces?: undefined;
|
|
81
118
|
query?: undefined;
|
|
82
119
|
};
|
|
83
120
|
required?: undefined;
|
|
@@ -95,10 +132,12 @@ export declare const tools: ({
|
|
|
95
132
|
task?: undefined;
|
|
96
133
|
code?: undefined;
|
|
97
134
|
task_type?: undefined;
|
|
135
|
+
tests?: undefined;
|
|
136
|
+
interfaces?: undefined;
|
|
98
137
|
query?: undefined;
|
|
99
138
|
};
|
|
100
139
|
required: string[];
|
|
101
140
|
};
|
|
102
141
|
})[];
|
|
103
|
-
export type ToolName = 'get_context' | 'validate' | 'search' | 'profiles' | 'health' | 'init';
|
|
142
|
+
export type ToolName = 'get_context' | 'validate' | 'verify' | 'search' | 'profiles' | 'health' | 'init';
|
|
104
143
|
//# sourceMappingURL=definitions.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,KAAK
|
|
1
|
+
{"version":3,"file":"definitions.d.ts","sourceRoot":"","sources":["../../src/tools/definitions.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,eAAO,MAAM,KAAK;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;IA6NjB,CAAC;AAGF,MAAM,MAAM,QAAQ,GAAG,aAAa,GAAG,UAAU,GAAG,QAAQ,GAAG,QAAQ,GAAG,UAAU,GAAG,QAAQ,GAAG,MAAM,CAAC"}
|