Ability to exclude certain objects (Procedures/Functions/Files...etc.) from being processed for a rule
Currently there is no way to tell Code Analysis to ignore this specific object for a specific rule which has led to several false positives and wasted time re-investigating how to address the issue in the object only to come to the same conclusion as before that this is one of the rare cases where breaking that rule is ok.
My example is we have one stored procedure out of a thousand where the use of a NVARCHAR(2) makes sense and is actually more efficient then switching to a NCHAR(2) for what the code needs to do. Unfortunately the procedure is always flagged for violating BP009 - Avoid var types of length 1 or 2. And so every time a junior dev goes to work on the procedure they spend hours trying to remove the NVARCHAR(2) and replace it with a NCHAR(2) only to find out after a review with a senior that they wasted their time as this is the one case where it's ok.
What I would like to see is on each rule be able to specify the name of a object that should be excluded for that rule.
I know that this feature used to exist at one point for some of the rules because looking at the Code Analysis xml shows possible entries for it, but there's no graphical way to do it anymore and no documentation on how to set those items up in the xml.
