rust-lang / rust-lang/rust-clippy

Allow configuring lints right from Cargo.toml

Open
#17,201 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

A-ui
Dominant language
Rust
Stars
13.5k
Forks
2.2k
Avg merge
2d 10h
Merged PRs (30d)
32

Description

I am adding files and directories to the root of the project very conservatively.

Since Cargo.toml already allows to enable/disable lints, it would be natural to be able to configure their options right there rather than needing a separate clippy.toml file.

For example, I'd really like to be able do this:

[workspace.lints.clippy]
unwrap_used = { level = "warn", allow-unwrap-in-tests = true }

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the requested [workspace.lints.clippy] settings in Cargo.toml with the existing clippy.toml configuration path. Trace how lint options are currently read, then establish done as equivalent options being accepted from Cargo.toml without requiring a separate clippy.toml file.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.