Mark Levison

Musings on No Touch Deployment, .NET development and photography

<September 2008>
SuMoTuWeThFrSa
31123456
78910111213
14151617181920
21222324252627
2829301234
567891011


Navigation

Other

Blogroll

Subscriptions

Post Categories



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

posted on Friday, March 11, 2005 5:43 PM by mlevison





Powered by Dot Net Junkies, by Telligent Systems