]> git.lizzy.rs Git - rust.git/blobdiff - README.md
Remove duplicate import of `Target`
[rust.git] / README.md
index 3103f960839899a29943f8064101c1d1d4e5cfff..e1b3c84d6917d0824701efce3508d0f0210c1473 100644 (file)
--- 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 357 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
+[There are over 400 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:
 
@@ -42,10 +42,8 @@ Table of contents:
 
 ## Usage
 
-Since this is a tool for helping the developer of a library or application
-write better code, it is recommended not to include Clippy as a hard dependency.
-Options include using it as an optional dependency, as a cargo subcommand, or
-as an included feature during build. These options are detailed below.
+Below are instructions on how to use Clippy as a subcommand, compiled from source
+or in Travis CI.
 
 ### As a cargo subcommand (`cargo clippy`)
 
@@ -83,11 +81,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
@@ -171,10 +169,33 @@ You can add options to your code to `allow`/`warn`/`deny` Clippy lints:
 
 Note: `deny` produces errors instead of warnings.
 
-If you do not want to include your lint levels in your code, you can globally enable/disable lints by passing extra
-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 do not want to include your lint levels in your code, you can globally enable/disable lints
+by passing extra flags to Clippy during the run:
+
+To disable `lint_name`, run
+
+```terminal
+cargo clippy -- -A clippy::lint_name
+```
+
+And to enable `lint_name`, run
+
+```terminal
+cargo clippy -- -W clippy::lint_name
+```
+
+This also works with lint groups. For example you
+can run Clippy with warnings for all lints enabled: 
+```terminal
+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:
+```terminal
+cargo clippy -- -A clippy::all -W clippy::useless_format -W clippy::...
+```
+Note that if you've run clippy before, this may only take effect after you've modified a file or ran `cargo clean`.
 
 ## Contributing