Skip to content

Commit

Permalink
tests: updated test code for objects rule
Browse files Browse the repository at this point in the history
FossilOrigin-Name: 6a264cfa40d7ac41b848a4208b1008caabc19cdad7bd6fd8a7126b4fa3f50dfd
  • Loading branch information
thindil committed Apr 11, 2024
1 parent 7756985 commit af5dd5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/rules/objects.nim
Original file line number Diff line number Diff line change
Expand Up @@ -131,14 +131,14 @@ checkRule:
if not checkResult:
break
if rule.options[0].toLowerAscii in ["standardtypes", "all"] and node.kind == nkObjectTy:
checkResult = true
checkResult = false
block standardTypes:
for child in node:
if child.kind == nkRecList:
for field in child:
try:
if ($field[^2]).toLowerAscii in ["int", "string"]:
checkResult = false
checkResult = true
break standardTypes
except:
discard
Expand Down

0 comments on commit af5dd5d

Please sign in to comment.