What
Add ci-doctor --baseline=baseline.json so a CI run only fails on
findings that are new relative to a checked-in snapshot. This makes
adoption viable on legacy repos that have hundreds of pre-existing
warnings.
Why
Every linter that landed in a real org needed this. Without it, the
first run is noise; with it, teams can ratchet the bar over time.
Sketch
ci-doctor --json --baseline-out baseline.json writes the current
set of {ruleId, file, line} tuples to disk.
ci-doctor --baseline baseline.json filters out any finding whose
tuple is in the baseline before printing.
--baseline should ignore line drift (match on
{ruleId, file, normalized-message} to allow line shifts).
Acceptance
- Two new flags work end-to-end
- Test in
test/baseline.test.js covering: baseline empty, baseline
exact, baseline with line drift, baseline with new finding
- README "Adopting on a legacy repo" section added
Estimate
~3-4 hours.
What
Add
ci-doctor --baseline=baseline.jsonso a CI run only fails onfindings that are new relative to a checked-in snapshot. This makes
adoption viable on legacy repos that have hundreds of pre-existing
warnings.
Why
Every linter that landed in a real org needed this. Without it, the
first run is noise; with it, teams can ratchet the bar over time.
Sketch
ci-doctor --json --baseline-out baseline.jsonwrites the currentset of
{ruleId, file, line}tuples to disk.ci-doctor --baseline baseline.jsonfilters out any finding whosetuple is in the baseline before printing.
--baselineshould ignore line drift (match on{ruleId, file, normalized-message}to allow line shifts).Acceptance
test/baseline.test.jscovering: baseline empty, baselineexact, baseline with line drift, baseline with new finding
Estimate
~3-4 hours.