ripbug-ai-detector
Version:
🔥 RipBug AI Bug Detector - Built by an AI that rips its own bugs. Destroy AI-generated bugs before you commit.
41 lines • 1.25 kB
TypeScript
import { FunctionInfo } from '../types/analysis';
export interface ComparisonResult {
regexCount: number;
treeCount: number;
differences: Difference;
complexityScore: number;
recommendation: 'regex' | 'tree-sitter' | 'hybrid';
performanceMetrics: PerformanceMetrics;
accuracyScore: number;
}
export interface Difference {
missedByRegex: FunctionInfo[];
missedByTree: FunctionInfo[];
parameterDifferences: ParameterDifference[];
}
export interface ParameterDifference {
functionName: string;
regexParams: string[];
treeParams: string[];
line: number;
}
export interface PerformanceMetrics {
regexTimeMs: number;
treeTimeMs: number;
speedRatio: number;
memoryUsage?: number;
}
export declare class AccuracyTester {
private simpleParser;
private enhancedParser;
constructor();
compareAccuracy(content: string, filePath: string): Promise<ComparisonResult>;
private parseWithRegex;
private parseWithTreeSitter;
private findDifferences;
private assessComplexity;
private calculateAccuracyScore;
private getRecommendation;
generateReport(result: ComparisonResult, filePath: string): string;
}
//# sourceMappingURL=accuracy-tester.d.ts.map