Getting Started
Scan a Rust workspace, get a score out of 100 and the three rules worth fixing first.
#What is rust-doctor?
rust-doctor inspects a local Cargo workspace with curated Clippy lints and native detectors, then scores it out of 100. It ends by naming the three rules worth fixing first, in the order that gives the most points back.
Everything runs on your machine. No network, no upload, no telemetry.
#Quick start
npx -y rust-doctor@latest .On a terminal, that opens the interactive report. In CI, a pipe, or an agent
run, add --yes to get the linear one.
#What it checks
62 rules across five producers. A rule's identifier names the producer that emits it.
| Producer | Rules | What it reads |
|---|---|---|
clippy::* | 37 | Clippy, curated rather than the whole set |
rust_doctor::cargo::* | 11 | Cargo.toml, Cargo.lock, .cargo/config.toml |
rust_doctor::structure::* | 9 | Complexity and near-duplicate code families |
rust_doctor::repo::* | 3 | What git tracks |
rust_doctor::source::* | 2 | Source text |
By category: maintainability 16, reliability 14, correctness 11, performance 10, security 6, dependencies 5.
Every rule ships at warn. Raising one to error, or dropping it entirely, is
your policy decision: see Configuration.
#How the score works
The score is a weighted average across 5 dimensions (Security ×2, Reliability ×1.5, Maintainability ×1, Performance ×1, Dependencies ×1). Each dimension carries a density rather than a count: the distinct sites its findings cover, weighed by severity, over the production lines the workspace holds. That density decays exponentially, on a curve calibrated per dimension.
Dividing by the size of the codebase is what keeps the score invariant to codebase size, and repairing sites is visible at every scale rather than only under a handful of findings. The full model is in Scoring.
| Score | Label | Meaning |
|---|---|---|
| 75–100 | Great | Healthy codebase |
| 50–74 | Needs work | Accumulated technical debt |
| 0–49 | Critical | Significant issues to address |
A score is published as authoritative only when every pass completed. If a pass fails, the report says so at that stage and drops the flag, rather than reporting a number that silently means less.