Overview of Clippy lints and categories
masterClippy is a collection of over 800 lints designed to catch common mistakes and improve Rust code quality. Lints are organized into categories, each with a default lint level (allow, warn, deny). You can control the strictness of Clippy by adjusting these levels.
Lint Categories
| Category | Description | Default level |
|---|---|---|
clippy::all | All lints 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::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 | Strict lints that may have occasional false positives | allow |
clippy::restriction | Lints that prevent the use of specific language or library features | allow |
clippy::nursery | New lints still under development | allow |
clippy::cargo | Lints for the Cargo manifest | allow |