Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
peakle committed Mar 27, 2022
1 parent be347a4 commit ae90e61
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions checkers/ruleguard_checker.go
Expand Up @@ -184,15 +184,15 @@ func newRuleguardChecker(info *linter.CheckerInfo, ctx *linter.CheckerContext) (
DebugPrint: debugPrint,
GroupFilter: func(g *ruleguard.GoRuleGroup) bool {
whyDisabled := ""
enabled := len(enabledGroups) == 0 || enabledGroups[g.Name]
enabled := flagEnable == "<all>" || enabledGroups[g.Name]
switch {
case !enabled:
whyDisabled = "not enabled by -enabled flag"
case disabledGroups[g.Name]:
whyDisabled = "disabled by -disable flag"
case len(enabledTags) != 0 && !inEnabledByTags(g):
whyDisabled = "not enabled by tags in -enable flag"
case inDisabledByTags(g):
case len(disabledTags) != 0 && inDisabledByTags(g):
whyDisabled = "disabled by tags in -disable flag"
}
if ruleguardDebug {
Expand Down

0 comments on commit ae90e61

Please sign in to comment.