Skip to content

Commit 5fab7ec

Browse files
authored
Mention that -D warnings will deny ALL warnings, not just clippy warnings
1 parent 949f584 commit 5fab7ec

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

README.md

+5
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,11 @@ before_script:
125125
# etc
126126
```
127127

128+
Note that adding `-D warnings` will cause your build to fail if **any** warnings are found in your code.
129+
That includes warnings found by rustc (e.g. `dead_code`, etc.). If you want to avoid this and only cause
130+
an error for clippy warnings, use `#![deny(clippy::all)]` in your code or `-D clippy::all` on the command
131+
line. (You can swap `clippy::all` with the specific lint category you are targetting.)
132+
128133
## Configuration
129134

130135
Some lints can be configured in a TOML file named `clippy.toml` or `.clippy.toml`. It contains a basic `variable = value` mapping eg.

0 commit comments

Comments
 (0)