This project is read-only.

StyleCop in project and solution settings

Aug 13, 2010 at 4:35 PM

I've added StyleCop to each project in one of my solutions so it runs on builds, and included the dlls and target file under source control.

When the build runs on the build server it doesn't appear to pick up the solution stylecop settings (as it flags is as hungarian notation). Whilst I fixed this, for now, by copying the settings.stylecop file into the stylecop directory under source control this of course runs the risk of becoming out of sync with the solution items settings file.

Is there a project file setting I'm missing somewhere to point to the solution wide, or project specific settings?

Aug 13, 2010 at 7:11 PM

Is the Settings.StylCop file for the solution in the solution directory on the build server?

Is the Settings.StyleCop file for the project in the project directory on the build server?


Aug 14, 2010 at 4:37 AM

Yes to both. Without a settings file in the same directory as the tasks file it acts as if there are no settings at all.

Aug 16, 2010 at 8:06 PM

Okay then, that rules out all the simple answers.

I've seen similar behaviour before, back when I was experimenting with programmatically launching StyleCop.

I believe it had to do with the passed arguments, an array of CsProject objects.  Was over a year ago though.

I think your best bet on solving this one would be to grab the source code and debug stylecop on the build machine.

I know, not a good solution, and perhaps not even workable, but that's the only way I can imagine finding the root of the problem.

Hope you can find a fix.

Aug 16, 2010 at 8:11 PM

Well as we're not allowing customizations from the standard rule-set it's not a concern right now. I had just wondered if I was doing something stupid :)