From b0de238b6522ce85ba26b8694d732e3f4520a78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matthias=20Kr=C3=BCger?= Date: Wed, 25 Mar 2020 11:36:17 +0100 Subject: [PATCH] readme: explain how to run only a single lint on a codebase --- README.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.md b/README.md index 7d6fcbc90..ebdab4c6a 100644 --- a/README.md +++ b/README.md @@ -90,6 +90,14 @@ 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