Rust
Quality Commands
Enforce code quality with Clippy for linting, rustfmt for formatting, and cargo-audit for vulnerability scanning. Catch bugs and maintain consistent style automatically.
7 commands
Pro Tips
Use 'cargo clippy -- -W clippy::pedantic' for stricter lints that catch subtle issues and improve idiomatic Rust.
Format all code: 'cargo fmt' — configure style in rustfmt.toml and add to pre-commit hooks.
Run 'cargo audit' regularly to check dependencies for known security vulnerabilities.
Common Mistakes
Don't suppress Clippy warnings without understanding them. They often reveal real bugs or performance issues.
cargo-audit only checks for known CVEs. It doesn't find new vulnerabilities in your dependencies.