ruff: Warnings about incompatible rules with `--select ALL`
I’d rather not see warnings about incompatible rules with --select ALL. Do the following warnings about incompatible rules appear by default on purpose with --select ALL?
-
"""Documentation.""" -
$ ruff --isolated --select ALL file.py warning: `one-blank-line-before-class` (D203) and `no-blank-line-before-class` (D211) are incompatible. Ignoring `one-blank-line-before-class`. warning: `multi-line-summary-first-line` (D212) and `multi-line-summary-second-line` (D213) are incompatible. Ignoring `multi-line-summary-second-line`. $ -
$ ruff --version ruff 0.1.3
About this issue
- Original URL
- State: open
- Created 3 years ago
- Reactions: 6
- Comments: 18 (17 by maintainers)
I do think we could consider removing these rules from
ALL.@nm-remarkable
I just tried
(with or without the
pydocstyle.conventionline) and I’m unable to reproduce. Could you open a new issue and provide more details (full ruff configuration, what ruff version are you using)We have over a million lines of code and currently use
ALLand disable about 40 rules (0.1.5 without preview). Without theALLwould we need to explicitly enable all 700 something rules? Enable all the categories, then specify individual ones we want disabled? That seems like it would get awkward? Or maybe I’m just selecting them wrong as it is?I think many of the formatters and linters (maybe to a lesser extent) are going to be somewhat opinionated. I’m ok with that provided there is a reasonable amount of flexibility to alter the behavior to suit my projects. Maybe in addition to
ALLadd aDEFAULTwhich is a curated selection and chooses or disables rules with conflicts. Or possibly something like a--select-conflict-defaultswhich allows to specify which rules are enabled in case of conflicts.I don’t have a strong preference on removal from
ALLbut find excluding rules fromALLa weird pattern.I’d rather close in favor of https://github.com/astral-sh/ruff/issues/1774
It makes sense. However, newcomers who start with
ruff check --helpsee:If you don’t want the warnings, I’d recommend explicitly ignoring two of those rules (whichever you do not want). In general, we do not recommend usage of
--select ALL.