import type { DiffFile, DiffHunk } from "./diff-parser.js"; import type { Finding } from "./types.js"; /** * Is this hunk PURE indentation churn: every removed and every added line accounted for by a * whitespace-only pair, with nothing left unpaired? * * The "fully paired" requirement (every remove and every add line in the hunk is consumed by a * 1:1 pair) is what makes the auto-fix in `fix.ts` safe: dropping a fully-paired churn hunk * removes an equal number of old-side and new-side lines, so it can never shift another hunk's * line numbers. A hunk containing an unequal-length remove/add run alongside pure churn is NOT * flagged here — `pairedRemoveAddRuns` silently skips unequal runs, and treating the REST of the * hunk as "100% churn" while ignoring lines it could not pair would both misreport the hunk and * make an auto-fix unsafe. */ export declare function isPureIndentationChurnHunk(hunk: DiffHunk): boolean; /** * Flag indentation-only churn and count changed lines with no semantic delta. * * Two finding shapes: * - `indentation-churn`: a hunk whose every line is accounted for by a whitespace-only * remove/add pair — the hunk changed formatting and nothing else. Auto-fixable: dropping the * whole hunk is safe (see `isPureIndentationChurnHunk`). * - `non-minimal-diff`: a hunk that is NOT pure churn but where at least half its PAIRED changed * lines (≥6 of them) carry no semantic delta — evidence of a diff that reformats lines it did * not need to touch alongside a real change, i.e. class (e), "non-minimal diffs touching * unrelated lines". Not auto-fixable: a partial hunk mixes a real edit with the noise, and * removing only the noise without re-deriving the hunk boundaries risks corrupting the real * change. */ export declare function analyzeDiffMinimality(files: readonly DiffFile[]): Finding[];