mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-04 02:38:25 +00:00
Update fixable list (#2316)
This commit is contained in:
parent
cec993aaa9
commit
535868f939
2 changed files with 4 additions and 3 deletions
|
@ -2245,7 +2245,7 @@ fix-only = true
|
|||
|
||||
A list of rule codes or prefixes to consider autofixable.
|
||||
|
||||
**Default value**: `["A", "ANN", "ARG", "B", "BLE", "C", "D", "E", "ERA", "F", "FBT", "I", "ICN", "N", "PGH", "PLC", "PLE", "PLR", "PLW", "Q", "RET", "RUF", "S", "T", "TID", "UP", "W", "YTT"]`
|
||||
**Default value**: `["A", "ANN", "ARG", "B", "BLE", "C", "COM", "D", "DTZ", "E", "EM", "ERA", "EXE", "F", "FBT", "G", "I", "ICN", "INP", "ISC", "N", "PD", "PGH", "PIE", "PL", "PT", "PTH", "Q", "RET", "RUF", "S", "SIM", "T", "TCH", "TID", "TRY", "UP", "W", "YTT"]`
|
||||
|
||||
**Type**: `Vec<RuleSelector>`
|
||||
|
||||
|
|
|
@ -190,14 +190,15 @@ pub struct Options {
|
|||
/// Like `fix`, but disables reporting on leftover violation. Implies `fix`.
|
||||
pub fix_only: Option<bool>,
|
||||
#[option(
|
||||
default = r#"["A", "ANN", "ARG", "B", "BLE", "C", "D", "E", "ERA", "F", "FBT", "I", "ICN", "N", "PGH", "PLC", "PLE", "PLR", "PLW", "Q", "RET", "RUF", "S", "T", "TID", "UP", "W", "YTT"]"#,
|
||||
default = r#"["A", "ANN", "ARG", "B", "BLE", "C", "COM", "D", "DTZ", "E", "EM", "ERA", "EXE", "F", "FBT", "G", "I", "ICN", "INP", "ISC", "N", "PD", "PGH", "PIE", "PL", "PT", "PTH", "Q", "RET", "RUF", "S", "SIM", "T", "TCH", "TID", "TRY", "UP", "W", "YTT"]"#,
|
||||
value_type = "Vec<RuleSelector>",
|
||||
example = r#"
|
||||
# Only allow autofix behavior for `E` and `F` rules.
|
||||
fixable = ["E", "F"]
|
||||
"#
|
||||
)]
|
||||
/// A list of rule codes or prefixes to consider autofixable.
|
||||
/// A list of rule codes or prefixes to consider autofixable. By default, all rules are
|
||||
/// considered autofixable.
|
||||
pub fixable: Option<Vec<RuleSelector>>,
|
||||
#[option(
|
||||
default = r#""text""#,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue