A collection of lints to catch common mistakes and improve your Rust code.
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
|all lints that are on by default (correctness, suspicious, style, complexity, perf)
|code that is outright wrong or useless
|code that is most likely wrong or useless
|code that does something simple but in a complex way
|code that can be written to run faster
|code that should be written in a more idiomatic way
|lints which are rather strict or might have false positives
|new lints that are still under development
|lints for the cargo manifest
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.