Design decisions

275. Lint severity: correctness denies in cpl lint, never in cpl build (2026-11-22)

  • Decision. Lints sit in groups: correctness, perf, idiom, style, pedantic. By default correctness is deny (cpl lint exits 1), perf, idiom and style warn, and pedantic is allow. No lint ever fails cpl build or cpl run. cp.toml [lints] sets a level for a whole group or for one lint, and with lint(name: allow) silences one lint in code. The v0.3 set is the existing records, plus L0601-L0609, plus the idiom catalog's P0 and bound-aware families. Every new lint stays opt-in until a corpus run shows 0 false positives.
  • Why. This was the recommendation of the lint-fmt question in plan/QUESTIONS.md, decided under Ryan's rule that reversible calls are made by their owner. A deny group makes cpl lint usable as a CI gate without ever blocking a submission. Ryan's lint target is "highly configurable; easy to turn off rules you don't like", and group levels turn off a whole family in one cp.toml line.
  • Reverse. Levels are data, one level line in each spec/lints/<name>/lint.toml, plus the group defaults in crates/cpl-lint/src/config.rs.