From 2c58a7bc088d455461b68d52c5c5ca90c8916662 Mon Sep 17 00:00:00 2001 From: jordancolbeth Date: Wed, 29 Jan 2025 09:49:31 -0800 Subject: [PATCH] internal: remove ellipses parameters from CPP_T057 --- .../Language Specific/C and C++/Types/CPP_T057/check.upy | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CodeCheck/All Checks/Language Specific/C and C++/Types/CPP_T057/check.upy b/CodeCheck/All Checks/Language Specific/C and C++/Types/CPP_T057/check.upy index c68f41d2..11543416 100644 --- a/CodeCheck/All Checks/Language Specific/C and C++/Types/CPP_T057/check.upy +++ b/CodeCheck/All Checks/Language Specific/C and C++/Types/CPP_T057/check.upy @@ -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"): @@ -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)