Reputation: 26408
Does anyone have settings for Visual Studio, in XML or a .vssettings-file, that is compatible with StyleCop?
I've used the book Framework Design Guidelines: Conventions, Idioms, and Patterns for Reusable .NET Libraries for guidance on what Microsoft finds to be the correct way to format C# and set my Visual Studio-settings accordingly.
But when I use "Format Document" in Visual Studio, StyleCop will fire on all cylinders and complains on all sorts of things.
Some errors even seems impossible to set in the settings. Like curly braces should be on a new line, if something spans for more than one row.
Upvotes: 3
Views: 3077
Reputation: 646
StyleCop for ReSharper would certainly help:
StyleCop for ReSharper is now feature complete in that is has reached feature parity with StyleCop 4.3.
There are 148 StyleCop rules.
We also provide 106 Quick Fixes that provide in place context menu fixes for violations for the 110 rules that can be fixed automatically
We also ship a "StyleCop friendly ReSharper Code Style Sharing Settings file" which configures ReSharper to automatically format code in a StyleCop friendly manner.
Upvotes: 3
Reputation: 33143
It costs money, but someone made a ReSharper plugin for StyleCop. Thanks for posting the question, I'd never heard of StyleCop before.
Upvotes: 2