-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Ignore preview status for fixable and unfixable selectors #9538
Conversation
@@ -786,7 +786,7 @@ impl LintConfiguration { | |||
.chain(selection.extend_fixable.iter()) | |||
.filter(|s| s.specificity() == spec) | |||
{ | |||
for rule in selector.rules(&preview) { | |||
for rule in selector.all_rules() { |
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.
If we only apply the change to the initial let mut fixable_set: RuleSet = RuleSelector::All.all_rules().collect()
, and not here, confusing things can happen... E.g. if you used select = ["RUF017"]
, then unfixable = ["RUF"]
wouldn't mark RUF017
as unfixable, which seems confusing.
CodSpeed Performance ReportMerging #9538 will degrade performances by 4.33%Comparing Summary
Benchmarks breakdown
|
|
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.
Yep thanks!
Gonna add a test prior to merging. |
1fea5fd
to
37f42fa
Compare
Summary
Right now, if you run with
explicit-preview-rules
, and use something likeselect = ["RUF017"]
, we won't actually enable fixing for that rule, becausefixable = ["ALL"]
(the default) won't includeRUF017
due to theexplicit-preview-rules
.The framing in this PR is that
explicit-preview-rules
should only affect the enablement selectors, whereas the fixable selectors should just include all possible matching rules. I think this will lead to the most intuitive behavior.Closes #9282. (An alternative to #9284.)