Skip to content

Document the new category selectors - #27906

Merged
ntBre merged 9 commits into
brent/category-selectorsfrom
brent/category-docs
Aug 27, 2026
Merged

ntBre merged 9 commits into
brent/category-selectorsfrom
brent/category-docs

Conversation

@ntBre

@ntBre ntBre commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

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

@ntBre ntBre added the documentation Improvements or additions to documentation label Aug 19, 2026
@astral-sh-bot

astral-sh-bot Bot commented Aug 19, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

Comment thread crates/ruff_linter/src/codes.rs Outdated
Comment thread crates/ruff_linter/src/codes.rs
Comment thread docs/linter.md Outdated
Comment thread docs/linter.md Outdated
Comment thread docs/linter.md Outdated
## 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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)

Comment thread docs/linter.md Outdated
Comment thread docs/linter.md Outdated
Comment on lines +213 to +214
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

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think deprecating linter groups changes whether they can be mixed. It's just that linter groups are deprecated.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@ntBre
ntBre force-pushed the brent/category-docs branch from 545bd1c to 31074ac Compare August 20, 2026 13:56
@ntBre
ntBre force-pushed the brent/category-docs branch 2 times, most recently from 9050ade to 52eed52 Compare August 20, 2026 14:55
@ntBre
ntBre force-pushed the brent/category-docs branch from 69042e5 to fae6441 Compare August 20, 2026 19:01
@ntBre
ntBre marked this pull request as ready for review August 20, 2026 19:09
@MichaReiser
MichaReiser self-requested a review August 21, 2026 06:49
@ntBre
ntBre force-pushed the brent/category-docs branch 2 times, most recently from 52ca2ae to dad9e88 Compare August 21, 2026 17:45
Comment thread docs/linter.md Outdated
Comment thread docs/linter.md Outdated
Comment thread docs/linter.md
Comment thread docs/linter.md Outdated
@ntBre
ntBre force-pushed the brent/category-docs branch from dad9e88 to 834429b Compare August 24, 2026 13:34
@ntBre
ntBre force-pushed the brent/category-docs branch from 76aa5ee to 6f4d1ab Compare August 25, 2026 18:51
@ntBre
ntBre force-pushed the brent/category-docs branch from 6f4d1ab to 83debc2 Compare August 25, 2026 21:05
ntBre added a commit that referenced this pull request Aug 26, 2026
@ntBre
ntBre force-pushed the brent/category-docs branch from 83debc2 to aa38fa0 Compare August 26, 2026 18:57
ntBre added a commit that referenced this pull request Aug 26, 2026
@ntBre
ntBre force-pushed the brent/category-docs branch from aa38fa0 to 0f847a5 Compare August 26, 2026 22:48
ntBre and others added 9 commits August 27, 2026 09:17
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>
ntBre added a commit that referenced this pull request Aug 27, 2026
@ntBre
ntBre force-pushed the brent/category-docs branch from 0f847a5 to 5518fd2 Compare August 27, 2026 13:20
@ntBre
ntBre merged commit 50a4d7f into main Aug 27, 2026
49 checks passed
@ntBre
ntBre deleted the brent/category-docs branch August 27, 2026 15:26
sharkdp pushed a commit that referenced this pull request Aug 31, 2026
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants