Map

Clippy

Wiki entityrustlintingtooling โ†ณ show in map Markdown
title
Clippy
type
entity
summary
The official Rust linter; ships hundreds of lints across ten categories, configurable per crate or per workspace via Cargo.toml
tags
rust, linting, tooling
created
2026-04-30
updated
2026-04-30

Clippy is the official Rust linter, distributed as a rustup component (rustup component add clippy) and run via cargo clippy. It ships hundreds of lints organized into ten categories: Correctness, Suspicious, Complexity, Perf, Style, Pedantic, Restriction, Cargo, Nursery, Deprecated.

A Clippy config has two surfaces:

  • Cargo.toml [lints.clippy] (or [workspace.lints.clippy]) โ€” turns lints on/off and sets their severity (warn, deny, allow).
  • clippy.toml โ€” config knobs for individual lints, including test-mode relaxations (e.g., allow-unwrap-in-tests = true).

Categories aren't toggle switches

The category groupings are loose. restriction in particular is documented as "should emphatically not be enabled as a whole" โ€” it contains mutually-contradictory lints (e.g., big_endian_bytes and little_endian_bytes). There's even a meta-lint, blanket_clippy_restriction_lints, to catch you trying. The Clippy docs recommend selective opt-in.

Workspace inheritance gotcha

Workspace [workspace.lints.clippy] does not auto-inherit. Each member crate must opt in with lints.workspace = true. Nightly has a missing_lints_inheritance lint to enforce it; on stable, the cargo-workspace-lints tool or a CI shell script is the workaround.

Coverage in the wiki

  • clippy-stricter-config โ€” Evan Schwartz's curated list of lints for catching panics, dropped futures, swallowed errors, and async footguns; framed as guardrails for coding agents.
Sub-pages