code-auditor-mcp
Version:
Multi-language code quality auditor with MCP server - Analyze TypeScript, JavaScript, and Go code for SOLID principles, DRY violations, security patterns, and more
37 lines • 1.39 kB
TypeScript
/**
* Base class for universal analyzers that work across languages
*/
import type { AnalyzerDefinition, AnalyzerResult, Violation } from '../types.js';
import type { AST, LanguageAdapter } from './types.js';
export interface UniversalAnalyzerOptions {
progressCallback?: (progress: number) => void;
[key: string]: any;
}
export declare abstract class UniversalAnalyzer implements AnalyzerDefinition {
abstract readonly name: string;
abstract readonly description: string;
abstract readonly category: string;
/**
* Main entry point - processes files and returns violations
*/
analyze(files: string[], config?: any, options?: UniversalAnalyzerOptions): Promise<AnalyzerResult>;
/**
* Implement this method to analyze an AST
*/
protected abstract analyzeAST(ast: AST, adapter: LanguageAdapter, config: any, sourceCode: string): Promise<Violation[]>;
/**
* Group files by their corresponding language adapter
*/
private groupFilesByAdapter;
/**
* Helper method to create a violation
*/
protected createViolation(file: string, location: {
line: number;
column: number;
}, message: string, severity: 'critical' | 'warning' | 'suggestion', rule: string, fix?: {
oldText: string;
newText: string;
}): Violation;
}
//# sourceMappingURL=UniversalAnalyzer.d.ts.map