Mark Levison

Musings on No Touch Deployment, .NET development and photography

<November 2008>
SuMoTuWeThFrSa
2627282930311
2345678
9101112131415
16171819202122
23242526272829
30123456


Navigation

Other

Blogroll

Subscriptions

Post Categories



Friday, March 11, 2005 - Posts

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 Friday, March 11, 2005 5:43 PM by mlevison with 0 Comments




Powered by Dot Net Junkies, by Telligent Systems