Skip to content

[WIP] Support lint level configuration in clippy.toml #15155

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

odysa
Copy link

@odysa odysa commented Jun 27, 2025

changelog: Add support for lint level configuration in clippy.toml

Fixes #15128

Add support for configuring lint levels in clippy.toml using the same format as Cargo.toml. This allows users to move lint configurations from Cargo.toml to clippy.toml to keep dependency management and linting separate.

Example

clippy.toml:

[lints.clippy]
needless_return = "allow"
single_match = { level = "warn", priority = 5 }

[lints.rust]
dead_code = "allow"

Add support for [lints.clippy] and [lints.rust] sections in clippy.toml
using the same format as Cargo.toml. clippy.toml configurations take
precedence over Cargo.toml with conflict warnings.

- Add shared lint configuration types
- Implement configuration merging with priority support
- Integrate lint argument injection in driver
- Extend lint priority conflict checking to clippy.toml
- Add comprehensive test suite

Fixes rust-lang#15128
@odysa odysa changed the title Support lint level configuration in clippy.toml [WIP] Support lint level configuration in clippy.toml Jun 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow all lints to be configured via clippy.toml
1 participant