rust-lang / rust-lang/rust-clippy
Allow specifying both project-wide and package-specific `clippy.toml` settings
@Centri3 is already working on this.
Since Jun 11, 2023.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
For Ruma, I would like to have both project-wide and package-specific .clippy.toml settings:
msrv(and import_rename once it's available) as a project-wide setting- Possibly a project-specific
msrvoverride - disallowed_type project-specific setting to disallow
HashMap/HashSetuse within proc-macros
It seems like this is not currently possible, with the first .clippy.toml found in one of the parent directories of the package being checked being used for all settings. Maybe an alternative to the current filesystem hierarchy based config lookup¹ would be to only search the package dir² and the workspace root³ for clippy configuration and make any settings in the former overwrite settings from the latter?
¹ which AFAIK has proved problematic for Cargo, with some people wanting to move certain settings to Cargo.toml for better reproducability
² CARGO_MANIFEST_PATH
³ workspace_root in the cargo metadata --format-version 1 output
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.