---
# System prepended metadata

title: Cargo Linting System

---

# Cargo Linting System

## 2025-08-19

Qualifications for stabilization
- Breaking changes
- Severe user quality
- Is it a good base for people to start writing lints?
  - Not a hard blocker but related

Steps
- Multiple lints
- Ideally in different places
  - manifest
  - pre-compile
  - post-compile

Non-blockers
- Minor internal cleanup
- json messages (https://github.com/rust-lang/cargo/issues/8283)
  - https://github.com/crate-ci/cargo-fixit will need it
- CLI/config lint level control

Potential changes
- ~~update annotate snippets~~[cargo#15909](https://github.com/rust-lang/cargo/pull/15909)
- ~~Newline between each `Report`~~[cargo#15920](https://github.com/rust-lang/cargo/pull/15920)
    - ~~Currently one `Report` follows the next with no space inbetween~~
- no warning count
- ~~cargo stops after the first package that errored~~[cargo#15889](https://github.com/rust-lang/cargo/pull/15889)
- clean up `get_spans`
- maybe clean up in getting diagnostic level?
- summing of warnings, errors
- tracking of lint-level source
  - to match rustc, should be last in first group
  - show source for each time the level is set (e.g. each package if its set in each package's `[lints]`)
    - what about inheritance?  only show inherited source once?
  - helper?
- workspace-level lints
  - currently, linting against inherited values are reported per-package
  - which lints table to read from?  Not all workspaces have `[workspace]`.  match `edition`?
- a lot of unwraps / panics
- No support for putting lints behind `-Z` flags
    - To get it to work like `features` would require major changes to `CliUnstable`
    - Might just have to have `if` statements around them when called