Skip to content

Commit 4aca13f

Browse files
committed
Auto merge of rust-lang#6287 - camsteffen:readme, r=llogiq
Readme improvements ~Moved the table of contents up, added an Overview heading.~ ~Made the "All the Clippy Lints" link clearer.~ Formatted the lint categories as a table with the default lint level (instead of saying on/off by default). Tweaked the descriptions. changelog: Improve Readme
2 parents 92ba075 + fd8dece commit 4aca13f

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

README.md

+13-19
Original file line numberDiff line numberDiff line change
@@ -7,28 +7,22 @@ A collection of lints to catch common mistakes and improve your [Rust](https://g
77

88
[There are over 400 lints included in this crate!](https://rust-lang.github.io/rust-clippy/master/index.html)
99

10-
We have a bunch of lint categories to allow you to choose how much Clippy is supposed to ~~annoy~~ help you:
11-
12-
* `clippy::all` (everything that is on by default: all the categories below except for `nursery`, `pedantic`, and `cargo`)
13-
* `clippy::correctness` (code that is just **outright wrong** or **very very useless**, causes hard errors by default)
14-
* `clippy::style` (code that should be written in a more idiomatic way)
15-
* `clippy::complexity` (code that does something simple but in a complex way)
16-
* `clippy::perf` (code that can be written in a faster way)
17-
* `clippy::pedantic` (lints which are rather strict, off by default)
18-
* `clippy::nursery` (new lints that aren't quite ready yet, off by default)
19-
* `clippy::cargo` (checks against the cargo manifest, off by default)
10+
Lints are divided into categories, each with a default [lint level](https://doc.rust-lang.org/rustc/lints/levels.html).
11+
You can choose how much Clippy is supposed to ~~annoy~~ help you by changing the lint level by category.
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
2023

2124
More to come, please [file an issue](https://github.com/rust-lang/rust-clippy/issues) if you have ideas!
2225

23-
Only the following of those categories are enabled by default:
24-
25-
* `clippy::style`
26-
* `clippy::correctness`
27-
* `clippy::complexity`
28-
* `clippy::perf`
29-
30-
Other categories need to be enabled in order for their lints to be executed.
31-
3226
The [lint list](https://rust-lang.github.io/rust-clippy/master/index.html) also contains "restriction lints", which are
3327
for things which are usually not considered "bad", but may be useful to turn on in specific cases. These should be used
3428
very selectively, if at all.

0 commit comments

Comments
 (0)