X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=README.md;h=222b81023a7705aa87847ea6fd913d50a380036c;hb=955a25ee7db234a8ab697176a433070702aabe59;hp=8635b2b6d5a55411868e0aeeac52e1e45f2a9dbb;hpb=23d2b212976d65ae72c0814d1d779d92a5d9c6fe;p=rust.git diff --git a/README.md b/README.md index 8635b2b6d5a..222b81023a7 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code. -[There are 360 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html) +[There are over 350 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html) We have a bunch of lint categories to allow you to choose how much Clippy is supposed to ~~annoy~~ help you: @@ -83,11 +83,11 @@ cargo clippy #### Automatically applying Clippy suggestions -Some Clippy lint suggestions can be automatically applied by `cargo fix`. +Clippy can automatically apply some lint suggestions. Note that this is still experimental and only supported on the nightly channel: ```terminal -cargo fix -Z unstable-options --clippy +cargo clippy --fix -Z unstable-options ``` ### Running Clippy from the command line without installing it @@ -175,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