Only show warnings for empty preview selectors when enabling rules#7842
Merged
Only show warnings for empty preview selectors when enabling rules#7842
Conversation
zanieb
commented
Oct 6, 2023
| if preview.mode.is_disabled() && kind.is_enable() { | ||
| if let RuleSelector::Rule { prefix, .. } = selector { | ||
| if prefix.rules().any(|rule| rule.is_nursery()) { | ||
| deprecated_nursery_selectors.insert(selector); |
Member
Author
There was a problem hiding this comment.
We could also push kind to these warning lists to facilitate different warnings by kind.
zanieb
commented
Oct 6, 2023
Comment on lines
+66
to
+67
| /// Modifies the behavior of selected rules | ||
| Modify, |
Member
Author
There was a problem hiding this comment.
Could be made more specific in the future if needed 🤷♀️
Contributor
PR Check ResultsEcosystem✅ ecosystem check detected no changes. |
Contributor
This is the right choice IMHO. Thank you! |
konstin
pushed a commit
that referenced
this pull request
Oct 11, 2023
…7842) Closes #7491 Users found it confusing that warnings were displayed when ignoring a preview rule (which has no effect without `--preview`). While we could retain the warning with different messaging, I've opted to remove it for now. With this pull request, we will only warn on `--select` and `--extend-select` but not `--fixable`, `--unfixable`, `--ignore`, or `--extend-fixable`.
20 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7491
Users found it confusing that warnings were displayed when ignoring a preview rule (which has no effect without
--preview). While we could retain the warning with different messaging, I've opted to remove it for now. With this pull request, we will only warn on--selectand--extend-selectbut not--fixable,--unfixable,--ignore, or--extend-fixable.