This project is read-only.

Getting start pointers

Feb 20, 2014 at 8:42 PM

We are getting started with Resharper + StyleCop for Re#, and I've got a couple of questions.

I see that StyleCop is project-based, or can even share settings across projects. No problem with that.

I started configuring a couple of Re# style preferences then soon discovered that this was a problem with StyleCop.

Turning the table on Re#, how do I determine what effect the StyleCop rules would have? For instance, there is a nifty tree of Enabled rules, many of which are checked, but nothing showing in Detailed settings.

Furthermore, there is no sample code illustrating what impact a rule would have? I don't know what to do with this and reading the tree of rules is painful.

Then... I may want to customize some rules: for instance, have a rule that requires private fields to be either readonly when possible and/or begin with an underscore ('_') convention, type thing.

Any suggestions where to begin with this? Just so we're not having to reinvent the wheel and can capture the style preferences we want on a consistent basis among our solutions and projects.

Thank you...
Feb 20, 2014 at 9:15 PM
Furthermore, turning the table on StyleCop, when I configure R# rules to how I'd like them, I get a warning saying I should reset because StyleCop is not liking them. Yet when I drill into the StyleCop rules there is practically no documentation on what they mean.

Take the Spacing Rules, for instance: what does "SA1000 KeywordsMustBeSpacedCorrectly", mean, exactly? Spaced correctly according to what?

What I am wondering is, is StyleCop worth the trouble? Or is a R#-application of rules and guidelines sufficient?

I am starting to lean that way, for the learning curve ramping up on StyleCop at any rate...

Anyone with any thoughts? Thanks ye...
Feb 20, 2014 at 10:28 PM
Documentation for the StyleCop rules can be found here: