@@ -10,16 +10,16 @@ A collection of lints to catch common mistakes and improve your [Rust](https://g
10
10
Lints are divided into categories, each with a default [ lint level] ( https://doc.rust-lang.org/rustc/lints/levels.html ) .
11
11
You can choose how much Clippy is supposed to ~~ annoy~~ help you by changing the lint level by category.
12
12
13
- Category | Description | Default level
14
- -- | -- | --
15
- ` clippy::all ` | all lints that are on by default (correctness, style, complexity, perf) | ** warn/deny**
16
- ` clippy::correctness ` | code that is outright wrong or very useless | ** deny**
17
- ` clippy::style ` | code that should be written in a more idiomatic way | ** warn**
18
- ` clippy::complexity ` | code that does something simple but in a complex way | ** warn**
19
- ` clippy::perf ` | code that can be written to run faster | ** warn**
20
- ` clippy::pedantic ` | lints which are rather strict or might have false positives | allow
21
- ` clippy::nursery ` | new lints that are still under development | allow
22
- ` clippy::cargo ` | lints for the cargo manifest | allow
13
+ | Category | Description | Default level |
14
+ | --------------------- | ----------------------------------------------------------------------- | ------------- |
15
+ | ` clippy::all ` | all lints that are on by default (correctness, style, complexity, perf) | ** warn/deny** |
16
+ | ` clippy::correctness ` | code that is outright wrong or very useless | ** deny** |
17
+ | ` clippy::style ` | code that should be written in a more idiomatic way | ** warn** |
18
+ | ` clippy::complexity ` | code that does something simple but in a complex way | ** warn** |
19
+ | ` clippy::perf ` | code that can be written to run faster | ** warn** |
20
+ | ` clippy::pedantic ` | lints which are rather strict or might have false positives | allow |
21
+ | ` clippy::nursery ` | new lints that are still under development | allow |
22
+ | ` clippy::cargo ` | lints for the cargo manifest | allow |
23
23
24
24
More to come, please [ file an issue] ( https://github.com/rust-lang/rust-clippy/issues ) if you have ideas!
25
25
@@ -130,18 +130,6 @@ script:
130
130
# etc.
131
131
```
132
132
133
- If you are on nightly, It might happen that Clippy is not available for a certain nightly release.
134
- In this case you can try to conditionally install Clippy from the Git repo.
135
-
136
- ``` yaml
137
- language : rust
138
- rust :
139
- - nightly
140
- before_script :
141
- - rustup component add clippy --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
142
- # etc.
143
- ```
144
-
145
133
Note that adding ` -D warnings ` will cause your build to fail if ** any** warnings are found in your code.
146
134
That includes warnings found by rustc (e.g. ` dead_code ` , etc.). If you want to avoid this and only cause
147
135
an error for Clippy warnings, use ` #![deny(clippy::all)] ` in your code or ` -D clippy::all ` on the command
0 commit comments