import type { Problem } from '../types/index.js'; /** Parsed `recheck-baseline.yaml`: counts per config-relative file per rule. */ export interface BaselineFile { version: 1; files: Record>; } export interface BaselineComparison { /** Problems to report: non-errors, over-budget groups, and stale entries. */ problems: Problem[]; /** Error findings hidden because their (file, rule) count matches the baseline. */ suppressed: number; /** Error findings in groups that exceed their baselined count. */ newFindings: number; /** (file, rule) entries whose baselined count exceeds what this run found. */ staleEntries: number; } export declare function parseBaseline(content: string, sourcePath: string): BaselineFile; /** Builds a baseline from a run's error findings. `toKey` maps a Problem's * file to the config-relative form stored in the baseline. */ export declare function buildBaseline(problems: Problem[], toKey: (file: string) => string): BaselineFile; /** Sorted keys throughout, so regeneration over unchanged input is * byte-identical and diffs read as pay-downs. */ export declare function serializeBaseline(baseline: BaselineFile): string; export interface CompareOptions { /** Files this run scanned, in the Problem.file form. */ scannedFiles: string[]; /** Rule names (full config keys) that actually ran. */ executedRules: Set; /** Maps a Problem.file to the config-relative key the baseline stores. */ toKey: (file: string) => string; /** * Config-relative roots this run walked exhaustively, when it did. A * baseline entry under one of these roots is in scope even when its file * no longer exists -- that is how a deleted file's zombie entry turns * stale. Leave unset for `--changed-only` runs, which walk nothing * exhaustively. */ scanRoots?: string[]; } /** * Applies the baseline to a run's problems. Errors only: warnings and info * pass through untouched. Staleness is scoped to what this run saw — a * (file, rule) entry is only judged when the file was scanned and the rule * ran, so `--rule`, `--changed-only`, and narrower paths never false-alarm. */ export declare function compareToBaseline(problems: Problem[], baseline: BaselineFile, options: CompareOptions): BaselineComparison; /** The config-relative key mapper both `run` and `baseline` share. */ export declare function baselineKeyMapper(configDir: string): (file: string) => string; //# sourceMappingURL=baseline.d.ts.map