Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Unused Input Parameters Expand / Collapse
Author
Message
Posted Wednesday, December 19, 2012 2:51 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 9:26 AM
Points: 341, Visits: 682
Comments posted to this topic are about the item Unused Input Parameters
Post #1398254
Posted Wednesday, December 19, 2012 10:22 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, March 19, 2014 7:04 AM
Points: 5, Visits: 78
Nice! I've been thinking about this as well. But the problem has been how to exclude comments in the query of the module definition. For example, if I've got a @ParamA parameter that's not used in the code but is included in a comment, I still want this reported since the parameter isn't used. It just happens to be referenced in a comment.
Post #1398537
Posted Wednesday, December 19, 2012 10:32 AM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 9:26 AM
Points: 341, Visits: 682
Very interesting! I had not considered this. The issue would be identifying such a case since comments can be in many different forms:

--@my_unused_parameter

-- @my_unused_parameter

-- need to clean this up one day! -> @my_unused_parameter

/* @my_unused_parameter */

/*
@my_unused_parameter
*/

Etc... You've given me some food for thought. Thanks for sharing! :)
Post #1398548
Posted Wednesday, February 26, 2014 2:36 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Thursday, February 27, 2014 6:12 AM
Points: 17, Visits: 12
What is the harm of having these Unused Parameters? Is this just for cleaning up your code?
Post #1545596
Posted Wednesday, February 26, 2014 4:13 PM
Old Hand

Old HandOld HandOld HandOld HandOld HandOld HandOld HandOld Hand

Group: General Forum Members
Last Login: Yesterday @ 9:26 AM
Points: 341, Visits: 682
No harm, just cleaner code.
Post #1545635
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse