-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine the warnings about incompatible linter options (#8196)
## Summary Avoid warning about incompatible rules except if their configuration directly conflicts with the formatter. This should reduce the noise and potentially the need for #8175 and #8185 I also extended the rule and option documentation to mention any potential formatter incompatibilities or whether they're redundant when using the formatter. * `LineTooLong`: This is a use case we explicitly want to support. Don't warn about it * `TabIndentation`, `IndentWithSpaces`: Only warn if `indent-style="tab"` * `IndentationWithInvalidMultiple`, `IndentationWithInvalidMultipleComment`: Only warn if `indent-width != 4` * `OverIndented`: Don't warn, but mention that the rule is redundant * `BadQuotesInlineString`: Warn if quote setting is different from `format.quote-style` * `BadQuotesMultilineString`, `BadQuotesDocstring`: Warn if `quote != "double"` ## Test Plan I added a new integration test for the default configuration with `ALL`. `ruff format` now only shows two incompatible rules, which feels more reasonable.
- Loading branch information
1 parent
be3307e
commit a4dd1e5
Showing
9 changed files
with
247 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.