Question

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?

Was it helpful?

Solution

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.

OTHER TIPS

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

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".

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top