@invisiblecities/sidequest-cqo
Version:
Configuration-agnostic TypeScript and ESLint orchestrator with real-time watch mode, SQLite persistence, and intelligent terminal detection
65 lines • 2.83 kB
TypeScript
/**
* Violation Tracker Service for Code Quality Orchestrator
* Manages violation lifecycle and deduplication
*/
import type { IViolationTracker, IStorageService, ProcessingResult, ValidationResult } from "./interfaces.js";
import type { Violation as OrchestratorViolation } from "../utils/violation-types.js";
export declare class ViolationTracker implements IViolationTracker {
private storageService;
private validationCache;
private hashCache;
private silent;
constructor(storageService: IStorageService);
setSilentMode(silent: boolean): void;
processViolations(violations: OrchestratorViolation[]): Promise<ProcessingResult>;
deduplicateViolations(violations: OrchestratorViolation[]): OrchestratorViolation[];
markAsResolved(violationHashes: string[]): Promise<number>;
markAsIgnored(violationHashes: string[]): Promise<number>;
reactivateViolations(violationHashes: string[]): Promise<number>;
generateViolationHash(violation: OrchestratorViolation): string;
validateViolationHash(violation: OrchestratorViolation, hash: string): boolean;
filterViolationsByRule(violations: OrchestratorViolation[], ruleIds: string[]): OrchestratorViolation[];
filterViolationsBySeverity(violations: OrchestratorViolation[], severities: string[]): OrchestratorViolation[];
filterViolationsByFile(violations: OrchestratorViolation[], filePaths: string[]): OrchestratorViolation[];
validateViolation(violation: OrchestratorViolation): ValidationResult;
sanitizeViolation(violation: OrchestratorViolation): OrchestratorViolation;
/**
* Clear internal caches to free memory
*/
clearCaches(): void;
/**
* Get cache statistics for monitoring
*/
getCacheStats(): {
validationCacheSize: number;
hashCacheSize: number;
totalCacheSize: number;
};
/**
* Process violations in batches for better performance
*/
processBatchedViolations(violations: OrchestratorViolation[], batchSize?: number): Promise<ProcessingResult[]>;
/**
* Get aggregated statistics from batch processing results
*/
aggregateBatchResults(results: ProcessingResult[]): ProcessingResult;
/**
* Apply multiple filters to violations
*/
applyFilters(violations: OrchestratorViolation[], filters: {
ruleIds?: string[];
severities?: string[];
filePaths?: string[];
categories?: string[];
sources?: string[];
}): OrchestratorViolation[];
}
/**
* Get or create violation tracker instance
*/
export declare function getViolationTracker(storageService: IStorageService): ViolationTracker;
/**
* Reset violation tracker instance (useful for testing)
*/
export declare function resetViolationTracker(): void;
//# sourceMappingURL=violation-tracker.d.ts.map