I saw similar questions but was unable to find the answer, even though some of them were marked as answered. I'm using ReSharper 6.1.1 and StyleCop 4.7.11.0. I put Settings.StyleCop file in the my solution's root folder. I unchecked documentation rules, so StyleCop settings look like this:
I even set "Do not merge with other settings files" option.
Then I open my solution, go to ReSharper -> Cleanup and delete current StyleCop preset.
Then I save and reopen ReSharper settings and go to Tools -> StyleCop and click "Reset C# code style options" button.
Then I save and reopen ReSharper settings again. I can see new CodeCleanup preset "StyleCop" and I suppose that this preset MUST be in sync with my Settings.StyleCop file. But it's not, Documentation section is still checked:
So, what am I doing wrong? PS: sorry for a lot of pictures, but I do believe that they clarify my question.
That is correct functionality. The ReSharper code cleanup styles are saved in the ReSharper settings file, and the StyleCop rules in the StyleCop settings file. They provide slightly different functionality in that the ReSharper plugin cleans up your code, while StyleCop simply checks your code. You have a point in that they perhaps should reference the same settings, but that isn't how it currently works.
I'm sure there is an explanation why (ie, they may have designed it to allow you to clean up the code but not enforce the rules), but that's probably best asked on the StyleCop website.