rust-doctor
Rules

Rules Overview

All 19 custom AST rules organized by category, plus 700+ clippy lints.

Custom AST rules

rust-doctor includes 19 custom rules that analyze the AST via syn. These detect issues that clippy and the Rust compiler cannot catch.

CategoryRuleSeverity
Error Handlingunwrap-in-productionWarning
Error Handlingpanic-in-libraryError
Error Handlingbox-dyn-error-in-public-apiWarning
Error Handlingresult-unit-errorWarning
Performanceexcessive-cloneWarning
Performancestring-from-literalInfo
Performancecollect-then-iterateWarning
Performancelarge-enum-variantWarning
Performanceunnecessary-allocationWarning
Architecturehigh-cyclomatic-complexityWarning
Securityhardcoded-secretsError
Securityunsafe-block-auditWarning
Securitysql-injection-riskError
Asyncblocking-in-asyncError
Asyncblock-on-in-asyncError
Frameworktokio-main-missingError
Frameworktokio-spawn-without-moveError
Frameworkaxum-handler-not-asyncWarning
Frameworkactix-blocking-handlerWarning

Clippy lints

rust-doctor runs clippy internally with 700+ lints and applies severity overrides and category mapping. Lints not in the built-in registry inherit clippy defaults and map to the Style category.

Framework-specific rules

Framework and async rules are conditionally enabled based on your project's dependencies. If your project doesn't use tokio, axum, or actix-web, those rules are automatically skipped.

On this page