From 04e251f623b7880fe2c0bd1ae247c52bc69b597a Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Mon, 10 Dec 2018 22:04:27 +0100 Subject: [PATCH 1/3] readme: tool lints are stable now --- README.md | 16 +--------------- 1 file changed, 1 insertion(+), 15 deletions(-) diff --git a/README.md b/README.md index 49c0a1f15467..928c961c017e 100644 --- a/README.md +++ b/README.md @@ -149,21 +149,7 @@ 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))] -``` - -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))] -``` - -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 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. ## License From d4da776ea77618a8b50f25b40224678065e27510 Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Mon, 10 Dec 2018 22:22:57 +0100 Subject: [PATCH 2/3] Also add note about using -W clippy::lint_group --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 928c961c017e..3e35f092559b 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ 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. +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` ## License From 0c93e4cdb2f6f41fdfd484f5b529454707850570 Mon Sep 17 00:00:00 2001 From: Philipp Hansch Date: Mon, 10 Dec 2018 22:30:16 +0100 Subject: [PATCH 3/3] s/clippy/Clippy in readme --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 3e35f092559b..f42771709fb7 100644 --- a/README.md +++ b/README.md @@ -106,8 +106,8 @@ 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 @@ -149,7 +149,7 @@ 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: `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` ## License