Skip to content

Commit

Permalink
fix: disabling the rule ifstatements
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 264fe691d12dad1b797d675c0040ae64edc47e5e6903db61ebf00d4f640b8968
  • Loading branch information
thindil committed Mar 19, 2024
1 parent 350f2f1 commit 8e335db
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/rules/ifstatements.nim
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,10 @@ checkRule:
messagePrefix = messagePrefix, rule = rule)
else:
for child in node:
setRuleState(node = child, ruleName = ruleSettings.name,
oldState = rule.enabled)
if not rule.enabled:
continue
if child.kind in {nkIfStmt, nkElifBranch, nkWhenStmt}:
var oldAmount: int = rule.amount
if child.len > 1:
Expand Down

0 comments on commit 8e335db

Please sign in to comment.