Skip to content

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.

ProducerRulesWhat it reads
clippy::*37Clippy, curated rather than the whole set
rust_doctor::cargo::*11Cargo.toml, Cargo.lock, .cargo/config.toml
rust_doctor::structure::*9Complexity and near-duplicate code families
rust_doctor::repo::*3What git tracks
rust_doctor::source::*2Source 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.

ScoreLabelMeaning
75–100GreatHealthy codebase
50–74Needs workAccumulated technical debt
0–49CriticalSignificant 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.

#Next