fix(linter): support -D all -D nursery

This commit is contained in:
Boshen 2024-04-22 12:43:12 +08:00
parent 8d17bb4052
commit b88dfd7cee
No known key found for this signature in database
GPG key ID: 234DA6A7079C6801

View file

@ -185,7 +185,7 @@ impl LintOptions {
AllowWarnDeny::Deny | AllowWarnDeny::Warn => { AllowWarnDeny::Deny | AllowWarnDeny::Warn => {
match maybe_category { match maybe_category {
Some(category) => rules.extend( Some(category) => rules.extend(
all_rules.iter().filter(|rule| rule.category() == category).cloned(), RULES.iter().filter(|rule| rule.category() == category).cloned(),
), ),
None => { None => {
if name_or_category == "all" { if name_or_category == "all" {