Ignore Attribute for FxCop?
As I much as I love FxCop I find it difficult to maintain exclusions when we
rename class/methods/variables. I think the underlying problem is that we can
only record exclusions in the FxCop project XML file. When a name changes all
previously excluded items reappear causing developers to curse the fact that
they renamed the method. An elegant solution to this problem would involve an
FxCop ignore attribute, for example:
[FxCopIgnore(" UsePropertiesWhereAppropriate", "Method has a non-trivial
cost")]
public void SetCellHeight(int height)
{
....
}
Now when FxCop runs it would find the attribute and ignore the method. Prior
art exists in the form of the pragma's that we used to in C++ to turn off
specific warnings.
BTW I've posted this as an enhancement
request at GotDotNet