diff options
| author | bors <bors@rust-lang.org> | 2020-03-29 15:28:56 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2020-03-29 15:28:56 +0000 |
| commit | 6527c3d99c2a33c5b44441b49b8664e554d12365 (patch) | |
| tree | 8f49bda3a7bdc0ccb7254c3679764675e16261c3 | |
| parent | ec5e9c7bbd0cd16c5ac3581f38d40dee1c3dff05 (diff) | |
| parent | 8fbf02c8fb3c87c25ec364aa5d43f47d8c3b9c87 (diff) | |
| download | rust-6527c3d99c2a33c5b44441b49b8664e554d12365.tar.gz rust-6527c3d99c2a33c5b44441b49b8664e554d12365.zip | |
Auto merge of #5384 - matthiaskrgr:readme_4, r=matthiaskrgr
readme: move "how to run single lint" instructions to "Allowing/denying lints" section. changelog: none
| -rw-r--r-- | README.md | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/README.md b/README.md index ebdab4c6a1a..5ab3ab128a8 100644 --- a/README.md +++ b/README.md @@ -90,14 +90,6 @@ Note that this is still experimental and only supported on the nightly channel: 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 To have cargo compile your crate with Clippy without Clippy installation @@ -183,6 +175,8 @@ If you do not want to include your lint levels in your code, you can globally en flags to Clippy during the run: `cargo clippy -- -A clippy::lint_name` will run Clippy with `lint_name` disabled and `cargo clippy -- -W clippy::lint_name` will run it with that enabled. This also works with lint groups. For example you can run Clippy with warnings for all lints enabled: `cargo clippy -- -W clippy::pedantic` +If you care only about a single lint, you can allow all others and then explicitly reenable +the lint(s) you are interested in: `cargo clippy -- -Aclippy::all -Wclippy::useless_format -Wclippy::...` ## Contributing |
