rust/book/src
Christopher B. Speir d66a0ec714 Fix typo in section '6.10. Macro Expansions' of the Clippy Book
The struct returned by the `Span::ctxt` method was listed as
`SpanContext`. The correct struct is currently named `SyntaxContext`.
2024-03-11 13:31:02 -05:00
..
continuous_integration Auto merge of #12025 - jetlime:master, r=flip1995 2024-01-04 10:48:53 +00:00
development Fix typo in section '6.10. Macro Expansions' of the Clippy Book 2024-03-11 13:31:02 -05:00
configuration.md Clean up Allowing/Denying Lints section 2024-02-26 16:43:05 +01:00
installation.md Gramar, and spelin kleanup 2023-03-30 15:31:14 -04:00
lint_configuration.md Alphabetize configuration options and lints in Clippy doc 2024-02-26 14:55:45 -06:00
lints.md Gramar, and spelin kleanup 2023-03-30 15:31:14 -04:00
README.md new lint: option_as_ref_cloned 2024-01-03 19:40:47 +01:00
SUMMARY.md Include GitLab in the CI section of the clippy doc book 2024-01-04 11:43:38 +01:00
usage.md Add the warning to all documentation. 2023-04-25 02:05:32 +02:00

Clippy

Clippy Test License: MIT OR Apache-2.0

A collection of lints to catch common mistakes and improve your Rust code.

There are over 700 lints included in this crate!

Lints are divided into categories, each with a default lint level. 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, suspicious, style, complexity, perf) warn/deny
clippy::correctness code that is outright wrong or useless deny
clippy::suspicious code that is most likely wrong or useless 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::style code that should be written in a more idiomatic way 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 if you have ideas!

The lint list also contains "restriction lints", which are for things which are usually not considered "bad", but may be useful to turn on in specific cases. These should be used very selectively, if at all.