mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-08 17:41:31 +00:00
Merge Availability and AutofixKind (#3629)
This commit is contained in:
parent
7c0f17279c
commit
fd39ec4bdd
26 changed files with 70 additions and 72 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
use itertools::Itertools;
|
||||
use ruff::registry::{Linter, Rule, RuleNamespace, UpstreamCategory};
|
||||
use ruff_diagnostics::AutofixKind;
|
||||
use strum::IntoEnumIterator;
|
||||
|
||||
const FIX_SYMBOL: &str = "🛠";
|
||||
|
@ -13,8 +14,8 @@ fn generate_table(table_out: &mut String, rules: impl IntoIterator<Item = Rule>,
|
|||
table_out.push('\n');
|
||||
for rule in rules {
|
||||
let fix_token = match rule.autofixable() {
|
||||
None => "",
|
||||
Some(_) => FIX_SYMBOL,
|
||||
AutofixKind::None => "",
|
||||
AutofixKind::Always | AutofixKind::Sometimes => FIX_SYMBOL,
|
||||
};
|
||||
|
||||
let rule_name = rule.as_ref();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue