3

Is it possible to get style cop to fix any issues? Or any other tool to fix the style cop issues?

I understand that some of the issues may be complicated to code for but this one "SA1101: The call to UpdateButtonLocations must begin with the 'this.' prefix to indicate that the item is a member of the class." looks like it should be fairly trivial to fix.

From reading around I think Resharper can be integrated so that it warns you of any issues as you code, and while this is useful it won't help me on an existing project with 100s of warnings similar to the one above!

AidanO
  • 868
  • 1
  • 11
  • 33
  • See http://stackoverflow.com/questions/832209/can-stylecop-automatically-fix-anything I believe this answers your question with a "maybe". – Tim M. Dec 22 '11 at 08:48
  • @Tim, I saw that question, but since that was posted in 2009 I was hoping there might have been some updates. – AidanO Dec 22 '11 at 16:18

3 Answers3

2

There is a style cop addin for ReSharper available (Look here). With that you can have the option to clean it manually or within the "Clean Code" functionality of ReSharper do it automatically.

Fischermaen
  • 12,238
  • 2
  • 39
  • 56
1

Resharper does have a clean solution that will do this to all files in the solution. Good idea or bad idea is up to you :)

Po-ta-toe
  • 731
  • 5
  • 13
1

There are many refactoring options built into Visual Studio 2010, and add-ons like Resharper (commercial) add many more.

These are mostly automatic and will speed up fixing such issues.

Oded
  • 489,969
  • 99
  • 883
  • 1,009