Search code examples
c#stylecop

Get Stylecop to automatically fix issues in c#


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!


Solution

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