views:

425

answers:

5

I personally don't use FxCop yet. We want to work out the unit testing first before going with code analysis. However, which rules would you permanantly deactivate? Which rules would you deactivate temporarily and in which situation?

+2  A: 

There's a whole list of pedantic crap you'll want to turn off depending on the system you're building. I'd suggest examining the FxCop output and deciding yourself. One mans pedantry is anothers "must have".

Quibblesome
+5  A: 

I dislike rule CA1021: Avoid out parameters. Out parameters are useful for many different patterns (including the .Net Try* pattern). Out can certainly be overused but really it seems overkill to have an FxCop rule for it.

Rule CA1021

JaredPar
+1  A: 

I don't use the naming convention rule that prohibits underscores in method/event names. I've gotten used to "Button1_Click". Visual Studio automatically inserts the underscores, so you have to manually remove them. I just think it's easier to leave them alone. And, I add the underscore when I create a method/event.

DOK
A: 

It complains about "ID" and suggests "Id"... even though that follows the "two-character-abbreviations-are-all-capped" rule :O)

Timothy Khouri
I was coming to this question from http://stackoverflow.com/questions/264823/whats-the-proper-naming-convention-for-a-property-id-id-or-id#264841 about ID or Id. Actually, Id is correct, because the two letter thing only applies to acronyms and not to abbreviations. :)
OregonGhost
But ID can be an acronym, since it stands for "identity documentation".
HeavyWave
Also known as "Id Documentation"? ;)
Rob Fonseca-Ensor
+3  A: 

CA2210 Assemblies should have valid strong names is an annoying one.

Wim Coenen
But I'm open to suggestions about why I should stop ignoring it :-)
Wim Coenen