Skip to content

Commit

Permalink
refactor: don't check sizeof procedure for named params, the same iss…
Browse files Browse the repository at this point in the history
…ues like with defined proc

FossilOrigin-Name: d8cf581d0b4fd57b3836b200f36157f823afc606dd1521fce43b5c510851456e
  • Loading branch information
thindil committed Nov 24, 2024
1 parent 4a04730 commit 211d02d
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/rules/namedparams.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Copyright © 2023 Bartek Jasicki
# Copyright © 2024 Bartek Jasicki
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
Expand Down Expand Up @@ -95,9 +95,9 @@ proc check(node, astNode: PNode; rule: var RuleOptions;
rule.amount = errorMessage(text = "Can't get the name of the call. Reason: ",
e = getCurrentException())
return
# Ignore checking for defined procedure. It looks like it doesn't like named
# parameters
if callName == "defined":
# Ignore checking for defined and sizeof procedures. It looks like they
# don't like named parameters
if callName in ["defined", "sizeof"]:
return
try:
for i in 1..<node.sons.len:
Expand Down

0 comments on commit 211d02d

Please sign in to comment.