The Artima Developer Community
Sponsored Link

.NET Buzz Forum
Ignore Attribute for FxCop?

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
Mark Levison

Posts: 877
Nickname: mlevison
Registered: Jan, 2003

Mark Levison an agile software developer who writes Notes from a tool user.
Ignore Attribute for FxCop? Posted: Mar 11, 2005 4:29 PM
Reply to this message Reply

This post originated from an RSS feed registered with .NET Buzz by Mark Levison.
Original Post: Ignore Attribute for FxCop?
Feed Title: Mark Levison
Feed URL: /WebLog/error.aspx?aspxerrorpath=/WebLog/mlevison/Rss.aspx
Feed Description: Musings on No Touch Deployment, .NET development and photography
Latest .NET Buzz Posts
Latest .NET Buzz Posts by Mark Levison
Latest Posts From Mark Levison

Advertisement

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


This Blog Hosted On: http://www.DotNetJunkies.com/

Read: Ignore Attribute for FxCop?

Topic: Congrats to Steve Previous Topic   Next Topic Topic: Web-based community sites...

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use