Document the new category selectors - #27906
Conversation
|
| ## Rule categories | ||
|
|
||
| In [preview](preview.md), Ruff supports rule categories similar to those in the [Clippy] linter in | ||
| addition to the Flake8-style linter groups described above. These categories are broader than the |
There was a problem hiding this comment.
Rather than saying that they're broader (which isn't true for all of them), maybe focus on saying that they group rules by what kind of problem they're flagging (clippy frames it around lints they offer)
| For now, these categories can be freely mixed with linter groups, linter prefixes, rule codes, and | ||
| rule names, although we plan to deprecate and eventually remove the linter groups in the future. In |
There was a problem hiding this comment.
I don't think deprecating linter groups changes whether they can be mixed. It's just that linter groups are deprecated.
There was a problem hiding this comment.
Removing them changes whether they can be mixed though! I did wonder if it was too early to mention that, or are you just suggesting to phrase it differently?
There was a problem hiding this comment.
I mean sure. You can't use them if they're gone. Or do you mean something different? It just feels to me, the importance is that we remove them. The rest sort of falls out from that
There was a problem hiding this comment.
Yeah, I just thought this was a reasonable place to mention our future plans for them. I guess I wasn't sure what you wanted me to change based on your comment. I could drop "deprecate and" or the whole "although" clause, separate the sentences, or just leave it alone. I don't feel strongly.
I guess "deprecate and remove" is a bit redundant, which is maybe your point, it just felt more reassuring to users than simply "remove," in my opinion.
There was a problem hiding this comment.
That's fair. What triggered my reaction here is that the sentence here feels very prominent. We talk about deprecation and removal before we even introduce the precedence. Maybe we should make this a warning box instead? It's also not clear as a user what you're supposed to do. I think what we want is to hear from users when they run into situations where they have to use linter group selectors. We could open an issue or discussion where users provide feedback and link to it from here. This ensures that we already have some input on missing categories/groups before deprecating them (in preview).
I then don't mind the deprecate and remove part as much anymore.
There was a problem hiding this comment.
That makes sense. I moved this to a note at the very end of the section and created #27959 so that I can link to it here.
545bd1c to
31074ac
Compare
9050ade to
52eed52
Compare
69042e5 to
fae6441
Compare
52ca2ae to
dad9e88
Compare
dad9e88 to
834429b
Compare
76aa5ee to
6f4d1ab
Compare
6f4d1ab to
83debc2
Compare
83debc2 to
aa38fa0
Compare
aa38fa0 to
0f847a5
Compare
Summary -- This includes both user-facing updates to our linter docs and selection settings, as well as some internal docs on the `Category` enum itself. Test Plan -- A few existing snapshot updates but mostly users reading this
Co-authored-by: Micha Reiser <micha@reiser.io>
Co-authored-by: Micha Reiser <micha@reiser.io>
0f847a5 to
5518fd2
Compare
Summary -- This includes the user-facing updates to our linter docs and selection settings to accompany #27666. Test Plan -- A few existing snapshot updates but mostly users reading this --------- Co-authored-by: Micha Reiser <micha@reiser.io>
Summary
This includes the user-facing updates to our linter docs and selection settings to accompany #27666.
Test Plan
A few existing snapshot updates but mostly users reading this