Skip to content

Commit

Permalink
tests: fixed disabling ifstatement rule
Browse files Browse the repository at this point in the history
FossilOrigin-Name: be8afd68488b3e49a223049cac2c564353676c3bbc422478b64a840d5163e882
  • Loading branch information
thindil committed Mar 17, 2024
1 parent a7aa4f2 commit 862351c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules/haspragma.nim
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ checkRule:
if rule.options[0].toLowerAscii != "unborrowed" or "borrow" notin strPragmas:
# Check the node for each selected pragma
for pragma in rule.options[1 .. ^1]:
{.ruleOff: "ifStatements".}
{.ruleOff: "ifstatements".}
if pragma[^1] == '*' and pragma[0] != '*':
var hasPragma: bool = false
for procPragma in strPragmas:
Expand Down Expand Up @@ -243,7 +243,7 @@ checkRule:
negativeMessage = negativeMessage, node = node,
ruleData = pragma, params = [
procName, $node.info.line, pragma])
{.ruleOn: "ifStatements".}
{.ruleOn: "ifstatements".}
endCheck:
if not rule.enabled and rule.amount == 0:
rule.amount = 1
Expand Down

0 comments on commit 862351c

Please sign in to comment.