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

function GetCompleteCustomerDetails(FirstName in nvarchar2, --Non compliant code (Function with more the default 10 number of parameters)
LastName in nvarchar2,
ADDRESS1 in nvarchar2,
ADDRESS2 in nvarchar2,
Area in nvarchar2,
City in nvarchar2,
State in nvarchar2,
Country in nvarchar2,
Landmark in nvarchar2,
Pincode in nvarchar2,
ContactNumber in nvarchar2,
Email in nvarchar2) return nvarchar2 
IS
BEGIN
	RETURN(CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(CONCAT(FirstName,LastName),CONCAT(ADDRESS1,ADDRESS2)),CONCAT(Area,City)),CONCAT(State,Country)),CONCAT(Landmark,Pincode)),CONCAT(ContactNumber,Email))); 
	
	CONCAT(CONCAT(ADDRESS1,ADDRESS2),CONCAT(Area,City));
	
END GetCompleteCustomerDetails
Visual Expert 2020
 VEPLSQLRULE105