Why you should care
Functions should not be defined with a variable number of arguments. Varargs methods are a convenient way to define methods that require a variable number of arguments, but they should not be overused. They can produce confusing results if used inappropriately.
How we detect
This Code Insight counts one occurrence each time the following pattern is detected in the source code:
void function ( String... strings ) { // ... }
References
https://www.baeldung.com/java-varargs
http://jtechies.blogspot.com/2012/07/item-42-use-varargs-judiciously.html
https://github.com/isocpp/CppCoreGuidelines/blob/036324/CppCoreGuidelines.md#f55-dont-use-va_arg-arguments
http://jtechies.blogspot.com/2012/07/item-42-use-varargs-judiciously.html
https://github.com/isocpp/CppCoreGuidelines/blob/036324/CppCoreGuidelines.md#f55-dont-use-va_arg-arguments
About CAST and Highlight’s Code Insights
Over the last 25 years, CAST has leveraged unique knowledge on software quality measurement by analyzing thousands of applications and billions of lines of code. Based on this experience and community standards on programming best practices, Highlight implements hundreds of code insights across 15+ technologies to calculate health factors of a software.