Purpose
-------
FS-508 — lint baseline: snapshot current violations so subsequent runs
can report only new vs resolved issues.
Responsibilities
----------------
- Save a baseline from lint results to ``.option_c/cache/lint-baseline.json``.
- Load an existing baseline from disk.
- Diff current results against a baseline to find new and resolved violations.
Diagnostics
-----------
Domain: OCT-LINTER
Levels:
L3 — baseline save/load/diff
Contracts
---------
- Baseline file is JSON with ``_schema_version``, ``entries``, metadata.
- Corrupt or missing file returns ``None`` (no crash).
- Violations are keyed by ``(path, rule)`` for diff stability.
| tuple[list[tuple[str, str, str]], list[tuple[str, str, str]]] oct.linter.lint_baseline.diff_against_baseline |
( |
list[dict] | results, |
|
|
LintBaseline | baseline ) |
Compare current *results* against *baseline*.
Returns ``(new_violations, resolved_violations)`` where each item is
``(path, rule, message)``.
A violation is identified by its ``(path, rule)`` pair. If a
``(path, rule)`` appears in current results but not in the baseline,
it is "new". If it appears in the baseline but not in current results,
it is "resolved".
Definition at line 133 of file lint_baseline.py.