Configuration
Configure rust-doctor via rust-doctor.toml or Cargo.toml metadata.
Configuration priority
Settings are resolved in this order (highest priority first):
- CLI flags — always override everything
rust-doctor.toml— project-level config file[package.metadata.rust-doctor]inCargo.toml— inline config- Defaults
rust-doctor.toml
Create a rust-doctor.toml at your project root:
# Disable specific rules
[rules]
disable = ["string-from-literal", "excessive-clone"]
# Set severity overrides
[severity]
"unwrap-in-production" = "error"
# Configure external tool passes
[passes]
clippy = true
audit = true
deny = true
machete = true
geiger = false
semver-checks = falseCargo.toml metadata
Alternatively, embed config in your Cargo.toml:
[package.metadata.rust-doctor]
rules.disable = ["string-from-literal"]Inline suppressions
Suppress specific diagnostics on individual lines:
let db_url = "postgres://localhost/mydb"; // rust-doctor:ignore[hardcoded-secrets]Skipping config
Use --no-project-config to ignore all file-based configuration. This is used by the MCP server when scanning untrusted projects.