Skip to content

Rules

62 rules across five producers, each admitted on measured precision.

The rule catalog lists every rule with its category, its default level and the guidance it carries. The machine-readable snapshot lives at /catalog/rules.json, generated from the binary itself.

#Five producers

A rule's identifier names the producer that emits it, which is also what tells you what it read to reach its conclusion.

PrefixRulesReads
clippy::*37Clippy, with the compiler behind it
rust_doctor::cargo::*11Cargo.toml, Cargo.lock, .cargo/config.toml
rust_doctor::structure::*9Complexity, and near-duplicate families
rust_doctor::repo::*3What git tracks
rust_doctor::source::*2Source text

Only Clippy compiles anything. The four native producers parse, read manifests, or ask git, and build nothing.

#Six categories

CategoryRulesScores into
maintainability16Maintainability
reliability14Reliability
correctness11Reliability
performance10Performance
security6Security
dependencies5Dependencies

The category also bounds how severe a rule may be: security rules sit in the top tiers, maintainability in the lowest. Widening that window is a deliberate edit to the catalog, not something a single rule can decide for itself.

#How a rule gets in

Two records admit a rule, and they answer different questions.

A trigger record proves the rule fires on the pattern it claims: either a frozen report naming it in an observed position, or a test that scans a fixture and asserts the finding. For a Clippy rule, the contract is the description the toolchain publishes, compared verbatim, so a lint whose meaning shifts upstream stops matching its own contract.

A corpus measurement answers how often it is wrong on healthy public code, over ten repositories pinned by commit. A rule measured above 5 % is published as noisy; a rule the corpus never triggered is published as unproven. Neither is removed, because both statements are more useful than a silent absence.

#Every rule ships at warn

No catalogued rule is an error by default, and no Clippy rule catalogued here is deny: a deny lint cannot be switched off without turning a scan into a compilation failure. Raising a rule, or a whole category, to error is your policy decision. See Configuration.