Skip to content

Commit

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

FossilOrigin-Name: 45f64834a8246a96e8a6c1fa70f9a823ac47f8047354c9c9d4ceac99fbdfbf80
  • Loading branch information
thindil committed Jan 8, 2025
1 parent c710ea0 commit d1e1fea
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 © 2024 Bartek Jasicki
# Copyright © 2024-2025 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 and sizeof procedures. It looks like they
# don't like named parameters
if callName in ["defined", "sizeof"]:
# Ignore checking for some system magic calls. It looks like they don't
# like named parameters
if callName in ["defined", "sizeof", "type"]:
return
try:
for i in 1..<node.sons.len:
Expand Down

0 comments on commit d1e1fea

Please sign in to comment.