tags:

views:

406

answers:

2

Is there a tool that can automatically fix StyleCop and FxCop rules, rather than manually fixing thousands of warning and errors?

There must be one, it is such a good business opportunity!

+2  A: 

StyleCop maybe (for some violations) - there are tons of code formatters.

FxCop no (that I am aware of).

ReSharper can help with its code cleanup and refactorings, but it's not going to magically fix all FxCop violations (although it will point out and help to fix some issues).

FxCop issues are similar to design patterns; they generally require thought to determine the proper way to apply the solution. In some cases the violation may not apply, and can be suppressed. You can also tune FxCop rules to your particular needs; the standard rules were intended for distributed frameworks and libraries, and are not universal. The majority of them are very, very good suggestions, though.

TrueWill
Since You already mentioned ReSharper: StyleCopForReSharper (http://www.codeplex.com/StyleCopForReSharper/) provides auto-fix for StyleCop rules.
The Chairman
+3  A: 

StyleFix will fix many of the violations found by StyleCop.
GhostDoc makes it easy to add comments to your methods.

Brad Bruce