mirror of
https://github.com/rust-lang/rust-clippy
synced 2024-11-10 23:24:24 +00:00
readme: remove paragraph about installing clippy manually on ci, if it is missing on a nightly
Clippy should always be available on nightly because we are gating on it in rustcs CI.
This commit is contained in:
parent
4911ab124c
commit
19ace28af4
1 changed files with 10 additions and 22 deletions
32
README.md
32
README.md
|
@ -10,16 +10,16 @@ A collection of lints to catch common mistakes and improve your [Rust](https://g
|
|||
Lints are divided into categories, each with a default [lint level](https://doc.rust-lang.org/rustc/lints/levels.html).
|
||||
You can choose how much Clippy is supposed to ~~annoy~~ help you by changing the lint level by category.
|
||||
|
||||
Category | Description | Default level
|
||||
-- | -- | --
|
||||
`clippy::all` | all lints that are on by default (correctness, style, complexity, perf) | **warn/deny**
|
||||
`clippy::correctness` | code that is outright wrong or very useless | **deny**
|
||||
`clippy::style` | code that should be written in a more idiomatic way | **warn**
|
||||
`clippy::complexity` | code that does something simple but in a complex way | **warn**
|
||||
`clippy::perf` | code that can be written to run faster | **warn**
|
||||
`clippy::pedantic` | lints which are rather strict or might have false positives | allow
|
||||
`clippy::nursery` | new lints that are still under development | allow
|
||||
`clippy::cargo` | lints for the cargo manifest | allow
|
||||
| Category | Description | Default level |
|
||||
| --------------------- | ----------------------------------------------------------------------- | ------------- |
|
||||
| `clippy::all` | all lints that are on by default (correctness, style, complexity, perf) | **warn/deny** |
|
||||
| `clippy::correctness` | code that is outright wrong or very useless | **deny** |
|
||||
| `clippy::style` | code that should be written in a more idiomatic way | **warn** |
|
||||
| `clippy::complexity` | code that does something simple but in a complex way | **warn** |
|
||||
| `clippy::perf` | code that can be written to run faster | **warn** |
|
||||
| `clippy::pedantic` | lints which are rather strict or might have false positives | allow |
|
||||
| `clippy::nursery` | new lints that are still under development | allow |
|
||||
| `clippy::cargo` | lints for the cargo manifest | allow |
|
||||
|
||||
More to come, please [file an issue](https://github.com/rust-lang/rust-clippy/issues) if you have ideas!
|
||||
|
||||
|
@ -130,18 +130,6 @@ script:
|
|||
# etc.
|
||||
```
|
||||
|
||||
If you are on nightly, 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 --toolchain=nightly || cargo install --git https://github.com/rust-lang/rust-clippy/ --force clippy
|
||||
# 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
|
||||
|
|
Loading…
Reference in a new issue