rust-doctor

Configuration

Configure rust-doctor via rust-doctor.toml or Cargo.toml metadata.

Configuration priority

Settings are resolved in this order (highest priority first):

  1. CLI flags — always override everything
  2. rust-doctor.toml — project-level config file
  3. [package.metadata.rust-doctor] in Cargo.toml — inline config
  4. 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 = false

Cargo.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.

On this page