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?
-
I was planning to use it with TFS. – Maxime Rouiller Nov 02 '08 at 20:44
5 Answers
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.

- 733,204
- 149
- 1,241
- 1,454
-
The Try* pattern does not trigger this rule. See the [MSDN page](http://msdn.microsoft.com/en-us/library/ms182131%28VS.80%29.aspx). – Kris Dec 13 '13 at 09:42
-
The community AddOn there does state that it doesn't violate this rule, but does not explain why. That doesn't seem like a good source. – Jason Kelley Jun 25 '14 at 15:45
CA2210 Assemblies should have valid strong names is an annoying one.

- 66,094
- 13
- 157
- 251
-
2But I'm open to suggestions about why I should stop ignoring it :-) – Wim Coenen Mar 18 '09 at 00:37
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".

- 25,225
- 10
- 61
- 100
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.

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

- 31,315
- 21
- 88
- 128
-
1I 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 Nov 05 '08 at 11:11
-
But ID can be an acronym, since it stands for "identity documentation". – Egor Pavlikhin Oct 20 '09 at 06:20
-
1