/** * 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; } /** * Map of rule-id → severity for overriding built-in severity defaults. * * Example: `{ "sql-injection-risk": "critical" }` restores the original * critical severity for SQL injection findings. */ export type SeverityOverrides = Record; 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; /** * Implement this method to analyze an AST */ protected abstract analyzeAST(ast: AST, adapter: LanguageAdapter, config: any, sourceCode: string): Promise; /** * 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; }, symbol?: string): Violation; } //# sourceMappingURL=UniversalAnalyzer.d.ts.map