diff options
| author | bors <bors@rust-lang.org> | 2019-04-11 05:09:18 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-04-11 05:09:18 +0000 |
| commit | bad3e080bdaa03af627abaec9dbd07d33ad272d7 (patch) | |
| tree | a4fd14a710123b93ccbaa618b58dd88475fb2938 | |
| parent | 2278814c8e33573b1c870c65f5fcbe69ea20601d (diff) | |
| parent | a7bfac735390d8c78c9f08e2ba8d87ac997f9dc9 (diff) | |
| download | rust-bad3e080bdaa03af627abaec9dbd07d33ad272d7.tar.gz rust-bad3e080bdaa03af627abaec9dbd07d33ad272d7.zip | |
Auto merge of #3930 - sunjay:patch-1, r=flip1995
Mention that -D warnings will deny ALL warnings, not just clippy warnings If we pass `-D warnings` to clippy, it causes the build to fail if there are *any* warnings, even the ones not generated by clippy. This isn't immediately obvious when you're looking at this as someone just setting up clippy, so people might not expect this nor know how to fix it. I've added a few sentences in the README to help anyone who runs into this. These docs are useful for anyone setting up clippy warnings to be denied during CI, but still otherwise want rustc warnings to be allowed. I could have also changed `-D warnings` to `-D clippy::all` in the Travis configurations themselves, but I wasn't sure what you would prefer to have people use as the default.
| -rw-r--r-- | README.md | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/README.md b/README.md index 43b477d2cef..14952063933 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,11 @@ before_script: # etc ``` +Note that adding `-D warnings` will cause your build to fail if **any** warnings are found in your code. +That includes warnings found by rustc (e.g. `dead_code`, etc.). If you want to avoid this and only cause +an error for clippy warnings, use `#![deny(clippy::all)]` in your code or `-D clippy::all` on the command +line. (You can swap `clippy::all` with the specific lint category you are targeting.) + ## Configuration Some lints can be configured in a TOML file named `clippy.toml` or `.clippy.toml`. It contains a basic `variable = value` mapping eg. |
