import type { ASTNode, Rule, Issue } from "../types.js"; import { Reporter } from "../reporter.js"; /** * Rule engine that orchestrates the execution of analysis rules */ export declare class RuleEngine { private rules; private reporter; constructor(rules: Rule[], reporter?: Reporter); /** * Add a rule to the engine */ addRule(rule: Rule): void; /** * Remove a rule from the engine */ removeRule(ruleId: string): boolean; /** * Get all rules in the engine */ getRules(): Rule[]; /** * Get the reporter instance */ getReporter(): Reporter; /** * Analyze a single AST with all configured rules */ analyze(ast: ASTNode, filePath: string, sourceCode: string): Issue[]; /** * Analyze multiple files */ analyzeMultiple(parseResults: Array<{ ast: ASTNode; filePath: string; sourceCode: string; }>): Issue[]; /** * Helper method to create a visitor that applies rules based on node types * This is a more advanced approach that allows for optimized traversal */ private createOptimizedVisitor; /** * Alternative analysis method using visitor pattern for potentially better performance */ analyzeWithVisitor(ast: ASTNode, filePath: string, sourceCode: string): Issue[]; /** * Clear all collected issues from the reporter */ clearResults(): void; /** * Print the analysis report */ printReport(): void; /** * Check if there are any errors that should fail the build */ hasErrors(): boolean; } //# sourceMappingURL=engine.d.ts.map