-
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
lint_groups_priority
: ignore lints & groups at the same level
#12827
Conversation
34ef4f4
to
9e5523e
Compare
Cargo.lock was updated to version 4 manually. All Git refs in our Cargo.lock appear to be encoded correctly. See: - rust-lang/cargo#12280 - rust-lang/cargo#12852 The clippy::incompatible_msrv lint may be useful in the future. We currently do not specify rust-version in Cargo.toml. Our libraries are not designed to be used outside Grandine. rust-toolchain.toml makes rust-version redundant for builds inside this repository. See: - https://doc.rust-lang.org/1.78.0/cargo/reference/manifest.html#the-rust-version-field - https://rust-lang.github.io/rust-clippy/rust-1.78.0/#/incompatible_msrv The clippy::lint_groups_priority lint produces false positives: - rust-lang/cargo#12918 (comment) - rust-lang/rust-clippy#12270 Luckily, lints inherited from a workspace do not trigger it. The issue appears to be fixed in rust-lang/rust-clippy#12827. The reason public functions trigger clippy::single_call_fn is actually our setting of avoid-breaking-exported-api. We assumed it was a bug.
if let Some((conflict, _)) = lints | ||
.iter() | ||
.rfind(|(_, lint_config)| lint_config.priority() == priority && lint_config.level() != level) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a reason to only lint one conflict instead of linting on all conflicts here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to keep the number of warnings reasonable, e.g. with 2 groups and 5 lints you get 2 warnings, one for each group, rather than 10
Just the one comment, otherwise looks fine otherwise. r=me if you don't feel like making the change. |
Thanks, @bors r=Jarcho |
☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test |
Cargo.lock was updated to version 4 manually. All Git refs in our Cargo.lock appear to be encoded correctly. See: - rust-lang/cargo#12280 - rust-lang/cargo#12852 The clippy::incompatible_msrv lint may be useful in the future. We currently do not specify rust-version in Cargo.toml. Our libraries are not designed to be used outside Grandine. rust-toolchain.toml makes rust-version redundant for builds inside this repository. See: - https://doc.rust-lang.org/1.78.0/cargo/reference/manifest.html#the-rust-version-field - https://rust-lang.github.io/rust-clippy/rust-1.78.0/#/incompatible_msrv The clippy::lint_groups_priority lint produces false positives: - rust-lang/cargo#12918 (comment) - rust-lang/rust-clippy#12270 Luckily, lints inherited from a workspace do not trigger it. The issue appears to be fixed in rust-lang/rust-clippy#12827. The reason public functions trigger clippy::single_call_fn is actually our setting of avoid-breaking-exported-api. We assumed it was a bug.
Fixes #12270
changelog: none