4

Which FxCop rules do you most value? Which rules highlight the best .Net gotchas?

Jeff Yates
  • 60,114
  • 20
  • 136
  • 187

5 Answers5

4

My favorite FxCop rules are the ones that don't give me errors when compiling my code.

casperOne
  • 72,334
  • 18
  • 180
  • 242
  • 2
    My favourite FxCop rules are the ones that DO give me errors when compiling my code. Otherwise, what's the point? :) – Rushyo Dec 17 '10 at 12:10
2

Which FxCop rules do you most value?

The one I am going to write to stop developers from using #defines instead of configuration (Quote needed: Preprocessor usage is bad OO practice). And I like almost all of the design rules.

Community
  • 1
  • 1
tobsen
  • 5,298
  • 3
  • 32
  • 49
2

I find some of the usage and design rules particularly helpful. I can never remember the details of how to implement the IDisposable or ISerializable interfaces, so I appreciate the gentle reminders from rules like these:

Don Kirkby
  • 47,683
  • 25
  • 191
  • 275
0

The ones I value the most, and which highlight the gotchas, are the Performance rules.

Austin Salonen
  • 47,582
  • 15
  • 104
  • 136
-1

This is not a FxCop rule but NDepend Code Query Language rule, but nevertheless, I love the CQL rule:

// <Name> Make sure refactored and added methods are covered by tests</Name>
WARN IF Count > 0 In SELECT METHODS WHERE 
PercentageCoverage < 100
AND (CodeWasChanged OR WasAdded)
Patrick from NDepend team
  • 13,048
  • 4
  • 55
  • 84