The official Rust linter: 800+ lints for common mistakes and unidiomatic code
open sourceMIT OR Apache-2.0free
Clippy is the Rust project's linter, with over 800 lints that catch common mistakes and help make code more idiomatic. Lints are grouped into categories (correctness, suspicious, style, complexity, performance, pedantic, restriction, nursery and cargo), each with a default level you can change. It installs with rustup component add clippy, runs as cargo clippy, and cargo clippy --fix applies many suggestions automatically.
Problems it solves
- lint Rust code in CI
- find unidiomatic Rust code
- automatically fix common Rust warnings
Features
- 800+ lints in configurable categories
- runs as cargo clippy
- automatic fixes with --fix
- pedantic and restriction lint groups for stricter projects
Alternatives
The same job
These do what Clippy does.
- ESLint Find and fix problems in your JavaScript code.
- Super-Linter Ready-to-run collection of linters and formatters as a GitHub Action or container
- Stylelint A CSS linter that catches errors and enforces conventions in your stylesheets
- golangci-lint Fast linters runner for Go
- lintr Static code analysis and style checking for R
- Biome One fast toolchain that formats and lints JavaScript, TypeScript, JSON, CSS, HTML, GraphQL, YAML and Markdown.
