3

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

Jeff Yates
  • 61,417
  • 20
  • 137
  • 189

5 Answers5

4

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

casperOne
  • 73,706
  • 19
  • 184
  • 253
  • 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,328
  • 3
  • 34
  • 51
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
  • 53,582
  • 27
  • 205
  • 286
0

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

Austin Salonen
  • 49,173
  • 15
  • 109
  • 139
-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,237
  • 6
  • 61
  • 92