-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Allow specifying both project-wide and package-specific clippy.toml
settings
#7353
Comments
Just to make sure I understand the algorithm you're proposing, let me try to restate it. Let's say you have a directory tree like this:
The idea is that when running clippy on project1, you'd first read This seems pretty reasonable, and in line with what a lot of other tools do. For the sake of argument, what if instead we made this explicit by adding something like |
@eholk That's exactly what I'm proposing, yes. Sure, I suppose in Ruma this could be used to have a single |
Thanks! I imagine the two approaches could work together if there was really a need for both, but it's probably better to get the simplest thing that works first. rust-lang/cargo#5034 is probably relevant here as well. |
Some other related issues: |
@rustbot claim |
@rustbot release-assignment 😢 Sorry all |
I'd like to take a crack at this, @rustbot claim |
It's worth noting you can kind of do this already (I think) using |
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 settingmsrv
overrideHashMap
/HashSet
use within proc-macrosIt 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 thecargo metadata --format-version 1
outputThe text was updated successfully, but these errors were encountered: