-
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
Rule categorization #1774
Comments
I agree that we should kick off a re-categorization effort. Like #1773, will reply in a bit with some more thoughts :) |
I generally agree. I need to give some thought to the right categorization since this will be hard to undo. My gut reaction is that... we may need more categories? Two that come to mind for me are
It's not really relevant for this debate, but: in the majority of cases, we support the entire plugin. There are a few exceptions. |
For inspiration/reference: overview of categories used in Plugin ticket: #1348 |
+1 for simplifying categories, it's kind of a mess with 60 categories now (wow that's a lot). I think it is totally reasonable to recategorize everything and assign coherent numbers for the error output (could use the [lints]
suspicious = "allow"
docstrings = "error" I do think it is still important to keep the |
Yeah, that's roughly my thinking too: recategorize the rules, but try to preserve support for the Flake8 compatibility layer at runtime + ship tooling to automatically migration an existing configuration file. |
Is this the case where ruff implements an entire flake8 plugin but then the plugin later adds new linting checks not covered by ruff? It seems to be hard to keep track of this sort of thing. |
I think there are two perspectives ruff users may have:
The README currently groups rules by their origin. Which I think is suboptimal for both cases. For the first case our README only lists the lints implemented by ruff but doesn't tell you which (or how many) lints ruff is missing. For the second case you don't actually care about where the lints are coming from, you just want to see them grouped by topic.
So I think we should steal a nice feature from Clippy which are lint categories. Clippy has the following categories:
We could simply use the same categorization (except with cargo instead being pyproject as per #1472). I think we would however need some additional categories since there are several lint categories that Rust does not need, for example:
#[deprecated]
macro for that) (see also #1507)What do you think about this?
The text was updated successfully, but these errors were encountered: