cargo clippy
A collection of lints to catch common mistakes and improve your Rust code.
More info →Options (3)
-W, --warnbooleanRun checks for a lint group (see <https://rust-lang.github.io/rust-clippy/stable/index.html#?groups=cargo,complexity,correctness,deprecated,nursery,pedantic,perf,restriction,style,suspicious>)
cargo clippy -- {{[-W|--warn]}} clippy::{{lint_group}}-D, --denybooleanTreat warnings as errors
cargo clippy -- {{[-D|--deny]}} warnings-A, --allowbooleanRun checks and ignore warnings
cargo clippy -- {{[-A|--allow]}} warningsExamples (8)
Run checks over the code in the current directory
Require that `Cargo.lock` is up to date
cargo clippy --lockedRun checks on all packages in the workspace
cargo clippy --workspaceRun checks for a package
cargo clippy --package packageRun checks for a lint group (see <https://rust-lang.github.io/rust-clippy/stable/index.html#?groups=cargo,complexity,correctness,deprecated,nursery,pedantic,perf,restriction,style,suspicious>)
cargo clippy -- [-W|--warn] clippy::lint_groupTreat warnings as errors
cargo clippy -- [-D|--deny] warningsRun checks and ignore warnings
cargo clippy -- [-A|--allow] warningsApply Clippy suggestions automatically
cargo clippy --fix