]> git.lizzy.rs Git - rust.git/blobdiff - README.md
Auto merge of #3519 - phansch:brave_newer_ui_tests, r=flip1995
[rust.git] / README.md
index 0d83224e3f622cf4faccca24f1392e7311cd7420..8ca10da416ddba62696cc2cba4d5e31d621807d4 100644 (file)
--- a/README.md
+++ b/README.md
@@ -7,7 +7,7 @@
 
 A collection of lints to catch common mistakes and improve your [Rust](https://github.com/rust-lang/rust) code.
 
-[There are 289 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
+[There are 291 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:
 
@@ -66,7 +66,7 @@ rustup update
 Once you have rustup and the latest stable release (at least Rust 1.29) installed, run the following command:
 
 ```terminal
-rustup component add clippy-preview
+rustup component add clippy
 ```
 
 Now you can run Clippy by invoking `cargo clippy`.
@@ -95,7 +95,7 @@ rust:
   - stable
   - beta
 before_script:
-  - rustup component add clippy-preview
+  - rustup component add clippy
 script:
   - cargo clippy
   # if you want the build job to fail when encountering warnings, use
@@ -106,15 +106,15 @@ script:
   # etc.
 ```
 
-It might happen that clippy is not available for a certain nightly release.
-In this case you can try to conditionally install clippy from the git repo.
+It might happen that Clippy is not available for a certain nightly release.
+In this case you can try to conditionally install Clippy from the git repo.
 
 ```yaml
 language: rust
 rust:
   - nightly
 before_script:
-   - rustup component add clippy-preview --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
+   - rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
    # etc
 ```
 
@@ -149,21 +149,11 @@ You can add options to your code to `allow`/`warn`/`deny` Clippy lints:
 
 Note: `deny` produces errors instead of warnings.
 
-Note: To use the new `clippy::lint_name` syntax, a recent compiler has to be used
-currently. If you want to compile your code with the stable toolchain you can use a `cfg_attr` to
-activate the `tool_lints` feature:
-```rust
-#![cfg_attr(feature = "cargo-clippy", allow(clippy::lint_name))]
-```
+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`
 
-For this to work you have to use Clippy on the nightly toolchain: `cargo +nightly clippy`. If you
-want to use Clippy with the stable toolchain, you can stick to the old unscoped method to
-enable/disable Clippy lints until `tool_lints` are stable:
-```rust
-#![cfg_attr(feature = "cargo-clippy", allow(clippy_lint))]
-```
+## Contributing
 
-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 lint_name` will run clippy with `lint_name` disabled and `cargo clippy -- -W lint_name` will run it with that enabled. On newer compilers you may need to use `clippy::lint_name` instead.
+If you want to contribute to Clippy, you can find more information in [CONTRIBUTING.md](https://github.com/rust-lang/rust-clippy/blob/master/CONTRIBUTING.md).
 
 ## License