mirror of
https://github.com/astral-sh/ruff.git
synced 2025-09-28 04:45:01 +00:00
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:
parent
c38617fa27
commit
40cad44f4a
8 changed files with 27 additions and 22 deletions
|
@ -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();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue