mirror of
https://github.com/rust-lang/rust.git
synced 2025-06-05 19:58:32 +00:00
readme: explain how to run only a single lint on a codebase
This commit is contained in:
parent
513b46793e
commit
b0de238b65
@ -90,6 +90,14 @@ Note that this is still experimental and only supported on the nightly channel:
|
|||||||
cargo fix -Z unstable-options --clippy
|
cargo fix -Z unstable-options --clippy
|
||||||
```
|
```
|
||||||
|
|
||||||
|
#### Running only a single lint
|
||||||
|
|
||||||
|
If you care only about the warnings of a single lint and want to ignore everything else, you
|
||||||
|
can first deny all the clippy lints and then explicitly enable the lint(s) you care about:
|
||||||
|
````
|
||||||
|
cargo clippy -- -Aclippy::all -Wclippy::useless_format
|
||||||
|
````
|
||||||
|
|
||||||
### Running Clippy from the command line without installing it
|
### Running Clippy from the command line without installing it
|
||||||
|
|
||||||
To have cargo compile your crate with Clippy without Clippy installation
|
To have cargo compile your crate with Clippy without Clippy installation
|
||||||
|
Loading…
Reference in New Issue
Block a user