We use FxCop's global suppressions to suppress rule violations found in old code. By old code I mean code that was written sometimes years before we turned on code analysis. We fix violations in new code. We cannot fix the violations in the old code all at once so we use suppressions.
Over time our global suppression files have become bloated. Often when a signature has changed on an old method the prior suppression becomes invalid because it no longer matches up with the code. We created new suppressions to ignore the old violation but often the old SuppressMessage attributes were left behind.
Does anybody know how to identify these SupressMessage declarations that do not match up with code? For that matter does anybody know how to identify SuppressMessage attributes that are invalid because there is no violation to supress?
I am thinking there may be a compiler or FxCopCmd warning or log message that might identify unused suppressions. If not that does anybody know of a script or VS extension that does it?
Thanks.