Dies ist die deutsche MFDoctor-Dokumentation. Technische Bezeichner, CLI-Flags, Regel-IDs und Codebeispiele bleiben unverändert, damit die Inhalte zwischen den Sprachen vollständig kompatibel bleiben. Verwenden Sie den Sprachumschalter für die kanonische englische Fassung.
Fingerprint baselines
Baselines let teams turn on CI failOn without fixing every legacy finding on
day one. New fingerprints still fail the gate; known debt is tracked in a
checked-in file and should shrink over time.
For whole-rule "off", severity overrides, packs, and failOn, see
Suppressions and allowlists.
Baselines are debt, not a permanent mute. Prefer fixing findings. Use a
baseline only for incremental adoption, and prune entries as debt is paid. Do
not add per-line eslint-disable-style source comments — fingerprint baselines
are enough for v1.
Dateiformat
Check in mfdoctor.baseline.json (JSON only; JSON Schema:
@tonoizer/mfdoctor/schemas/baseline.schema.json):
Each entry is keyed by finding fingerprint. Optional ruleId and project
narrow the match (both must agree when present). Optional reason is copied
onto the finding as suppressionReason for reports.
Generieren und aktualisieren
- Run MFDoctor so
.mf/doctor/report.jsonexists (plugin build ormfdoctor check/mfdoctor federation). - Create a baseline from that report:
- After more findings appear, merge them into the baseline without removing existing entries:
- When debt is paid, drop unused fingerprints:
Defaults: report path .mf/doctor/report.json, output mfdoctor.baseline.json.
Auf check, federation und Plugins anwenden
Config (mfdoctor.config.ts or plugin options):
CLI:
Plugin CI runs use the same DoctorOptions.baseline field:
Richtlinienverhalten
- Matched findings stay in terminal, JSON, and SARIF reports, marked
suppressed: true(SARIFsuppressionswith kindexternal). - By default they do not fail
failOnpolicy. - Set
baseline.failOnSuppressed: trueif suppressed findings should still fail the gate. - Unused baseline fingerprints emit
doctor/stale-baselineinfo findings whenreportStaleis true (default). Remove those entries — the debt is paid.
Rezept für die schrittweise Einführung
- Enable the MFDoctor plugin and collect a full report with
failOn: "never"(or local defaults). mfdoctor baseline generateand commit the file.- Turn on CI
failOn: "error"(or rely on CI auto-detect). - Fix or intentionally baseline only new regressions; prune as you clear debt.
- Treat a growing baseline as a process smell — shrink it.