Drop formatting specific rules from the default set (#7900)

Closes https://github.com/astral-sh/ruff/issues/7572

Drops formatting specific rules from the default rule set as they
conflict with formatters in general (and in particular, conflict with
our formatter). Most of these rules are in preview, but the removal of
`line-too-long` and `mixed-spaces-and-tabs` is a change to the stable
rule set.

## Example

The following no longer raises `E501`
```
echo "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx = 1" | ruff check -
```
This commit is contained in:
Zanie Blue 2023-10-11 11:29:34 -05:00 committed by GitHub
parent c38617fa27
commit 40cad44f4a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 27 additions and 22 deletions

View file

@ -27,7 +27,7 @@ use ruff_linter::settings::types::{
UnsafeFixes, Version,
};
use ruff_linter::settings::{
resolve_per_file_ignores, LinterSettings, DUMMY_VARIABLE_RGX, PREFIXES, TASK_TAGS,
resolve_per_file_ignores, LinterSettings, DEFAULT_SELECTORS, DUMMY_VARIABLE_RGX, TASK_TAGS,
};
use ruff_linter::{
fs, warn_user, warn_user_once, warn_user_once_by_id, RuleSelector, RUFF_PKG_VERSION,
@ -645,7 +645,7 @@ impl LintConfiguration {
};
// The select_set keeps track of which rules have been selected.
let mut select_set: RuleSet = PREFIXES
let mut select_set: RuleSet = DEFAULT_SELECTORS
.iter()
.flat_map(|selector| selector.rules(&preview))
.collect();