mirror of
https://github.com/danbulant/oxc
synced 2026-05-24 12:21:58 +00:00
refactor(linter): separate out the category in the output of --rules
This commit is contained in:
parent
ca009d5995
commit
4ced3f949c
1 changed files with 3 additions and 1 deletions
|
|
@ -136,7 +136,9 @@ impl Linter {
|
|||
for (category, rules) in rules_by_category {
|
||||
writeln!(writer, "{} ({}):", category, rules.len()).unwrap();
|
||||
for rule in rules {
|
||||
writeln!(writer, "• {}/{}", rule.plugin_name(), rule.name()).unwrap();
|
||||
// Separate the category and rule name so people don't copy the combination as a whole for `--allow` and `--deny`,
|
||||
// resulting invalid rule names.
|
||||
writeln!(writer, "• {}: {}", rule.plugin_name(), rule.name()).unwrap();
|
||||
}
|
||||
}
|
||||
writeln!(writer, "Total: {}", RULES.len()).unwrap();
|
||||
|
|
|
|||
Loading…
Reference in a new issue