Home

Functions and procedures should not have too many parameters

Rule description

  • Functions and procedures should not have too many parameters

 

Non-compliant Code Example

CREATE procedure [DATA].sp_GetEmployee(@fname nvarchar(10), @lname nvarchar(10),@mname nvarchar(10), @city nvarchar(10),@state nvarchar(10), @designation nvarchar(10),@level nvarchar(10), @technology nvarchar(10),@expierence nvarchar(10), @expertise nvarchar(10),@joinSince nvarchar(10))  --Non compliant code (Number of parameters are more then default defined limit 10)
AS
BEGIN
	Select [DATA].[GetEmployee](@fname, @lname,@mname,@city,@state,@designation,@level, @technology,@expierence,@expertise,@joinSince);
END
Visual Expert 2020
 VETSQLRULE42