ruff/crates/ruff_workspace/src
Micha Reiser a4dd1e5fad
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 https://github.com/astral-sh/ruff/issues/8175
and https://github.com/astral-sh/ruff/issues/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.
2023-10-26 16:22:56 +00:00
..
configuration.rs Use `line-length` setting for isort (#8235) 2023-10-26 02:16:59 +01:00
lib.rs Add most formatter options to `ruff.toml` / `pyproject.toml` (#7566) 2023-09-22 15:47:57 +00:00
options.rs Refine the warnings about incompatible linter options (#8196) 2023-10-26 16:22:56 +00:00
options_base.rs Rust 1.73 (#8007) 2023-10-23 02:12:25 +00:00
pyproject.rs Add `[format|lint].exclude` options (#8000) 2023-10-18 01:15:25 +00:00
resolver.rs Memoize and avoid candidate creation calls (#8230) 2023-10-25 17:50:58 -04:00
settings.rs Change `line-ending` default to `auto` (#8057) 2023-10-20 00:13:11 +01:00