Skip to content
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

Fix lint priority #55

Merged
merged 1 commit into from
Mar 9, 2024
Merged

Fix lint priority #55

merged 1 commit into from
Mar 9, 2024

Conversation

danielparks
Copy link
Owner

Lint rules in the [lints] table are not applied in file order. This could cause certain rules to be ignored if they were applied before the rule that effects the group they were in. For example, if clippy::nursery and clippy::option_if_let_else have the same priority, then nursery gets applied after option_if_let_else, causing the more specific rule to be ignored.

This explicitly sets nursery and pedantic to priority -1 so that they are overridden by more specific rules (which are priority 0 by default).

Lint rules in the `[lints]` table are not applied in file order. This
could cause certain rules to be ignored if they were applied before the
rule that effects the group they were in. For example, if
`clippy::nursery` and `clippy::option_if_let_else` have the same
priority, then `nursery` gets applied after `option_if_let_else`,
causing the more specific rule to be ignored.

This explicitly sets `nursery` and `pedantic` to priority -1 so that
they are overridden by more specific rules (which are priority 0 by
default).
@danielparks danielparks merged commit ed91ea2 into main Mar 9, 2024
5 checks passed
@danielparks danielparks deleted the lint-priority branch March 9, 2024 18:18
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.

1 participant