Replies: 1 comment 1 reply
-
Ruff has no such command today. It only supports querying all existing rules I think the problem today is that it's difficult to know which rules should be enabled and Ruff doesn't provide a good default. We're working on #1774 which hopefully solves that problem and reduces the need for a command to query e.g. all pylint rules. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I would like to "ask"
ruff
directly some questions about the rules configuration. I don't want to look into the HTML documentation or somewhere else. I would like to have the answers in a machine readable way.Example 1
Question: List all active rules.
The answer is just a list (line by line or JSON) of rule codes. The content of the answer depends on the configuration of ruff. If there is no config it should return the rules active by default. If there is a config enabling and disabling rules or group of rules the list should be different.
Example 2
Question: List all rules (with or without preview rules).
Diff this list with the list of Example 1 I could easily get an idea what is missing in my config.
Example 3
Question: List all PyLint rules.
Question: List all PyLint analoge rules.
Question: List all PyLint rules incl. the analoge.
I really mean there should be a linter name and not only the error group. How do I know the Pylint error groups? Reading the docs, yes. But ruff could tell me them more easily.
Just a quick n dirty idea.
Example 4 (my real use case)
Problem: Currently I do not know if there are any PyLint related rules active by default. So I don't know which one to enable.
Question: List all inactive PyLint related rules.
Beta Was this translation helpful? Give feedback.
All reactions