Skip to content

Commit

Permalink
internal: remove ellipses parameters from CPP_T057
Browse files Browse the repository at this point in the history
  • Loading branch information
jordancolbeth committed Jan 29, 2025
1 parent e759938 commit 2c58a7b
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,7 @@ def check(check, file):
# gather a list of parameter types, split from string into list
if func_ent.parameters():
func_parameters = func_ent.parameters(shownames=False).split(",")
func_parameters = [param.strip() for param in func_parameters if param.strip() != "..."]

# go to each call of that function
if func_ent.refs("c callby"):
Expand Down Expand Up @@ -134,5 +135,5 @@ def check(check, file):
cast_ok = check_for_cast(lexer, call, arg_name_list, arg_list, i)

if not cast_ok:
check.violation(call.scope(), file, call.line(), call.column(), "Parameter #%3 and corresponding argument do not match; Argument should be explicitly cast. Param: %1, Arg: %2", func_parameters[i], arg_list[i], i+1)
check.violation(call.scope(), file, call.line(), call.column(), "Parameter %1 and corresponding argument do not match; Argument should be explicitly cast.", i+1)

0 comments on commit 2c58a7b

Please sign in to comment.