rust-lang / cargo

The Rust package manager
https://doc.rust-lang.org/cargo
Apache License 2.0
12.58k stars 2.39k forks source link

Give lint groups have a lower default default priority #13565

Open Beanie496 opened 6 months ago

Beanie496 commented 6 months ago

Problem

Currently, giving a level to a lint group (like pedantic in clippy) will override a level given to a specific lint if it's higher than the lint alphabetically. For example, pedantic = "deny" will override ptr_as_ptr = "allow" but not option_option = "allow".

Proposed Solution

Give the lint groups a default priority of -1.

Notes

No response

epage commented 6 months ago

Not changing the priority but changing our sorting within a priority was a future possibility from the RFC.

The first step would be #12918.

Beanie496 commented 6 months ago

Ah, I didn't know about the RFC - thanks. My suggestion is probably redundant then.

epage commented 6 months ago

Re-opening so we have this as a place to discuss this if/when we get to that point.