Why you should care
Parameters are used to pass data between a stored procedure and the batch or script. It results in executing the stored procedure. Each Parameter has a limit, known as a Parameter limit, which is hard-coded per stored procedure. The Parameter limit, in an SQL server, is 2,100. This limit ensures avoiding bugs or improper use of procedures in the code.
Business Impacts
It is advised that Parameters should be approached carefully as misuse can cause bugs which can slow the innovative potential of the code. These factors can make the code unsuitable for clients.
CAST Recommendations
Reduce the total number of parameters by subdividing your functions into more specialized and granular artifacts.
How we detect
This code insight establishes that functions, procedures and triggers should not have too many parameters. Depending on thresholds observed in the benchmark of thousands of applications and billions lines of code, Highlight accounts penalty points to the given scanned files.
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.