Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save Mark-Simulacrum/50cf817b255639ae9338e98d479e99d0 to your computer and use it in GitHub Desktop.
Save Mark-Simulacrum/50cf817b255639ae9338e98d479e99d0 to your computer and use it in GitHub Desktop.
Checks a package to catch common mistakes and improve your Rust code.
Usage:
cargo clippy [options] [--] [<opts>...]
Common options:
-h, --help Print this message
--features Features to compile for the package
-V, --version Print version info and exit
Other options are the same as `cargo rustc`.
To allow or deny a lint from the command line you can use `cargo clippy --`
with:
-W --warn OPT Set lint warnings
-A --allow OPT Set lint allowed
-D --deny OPT Set lint denied
-F --forbid OPT Set lint forbidden
The feature `cargo-clippy` is automatically defined for convenience. You can use
it to allow or deny lints from the code, eg.:
#[cfg_attr(feature = "cargo-clippy", allow(needless_lifetimes))]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment