16

I wonder if anybody tried to integrate StyleCop into CruiseControl.NET.

Does anybody know something about it? or at least did anybody create and publish an xsl file for displaying StyleCop result onto CCNet's dashboard?

EDIT: I found this project, it provies cmd interface for StyleCop, produces result in xml format and also provides xsl for transforming this xml into html. Now just put these things together with CCNet.

Steve
  • 371
  • 4
  • 13

5 Answers5

9

On October 5th, 2009 Yves Tremblay added a nice StyleCop integration to CCNET Community. We switched from StyleCopCmd to this solution and didn't regret.

The Chairman
  • 7,087
  • 2
  • 36
  • 44
6

I've been using StyleCop as a part of a TeamCity build environment.

(TeamCity is like CruiseControl.NET, but with decent documentation and an almost zero need to monkey around with Xml configuration files.)

I wrote my own front end for StyleCop to make this work.

See http://www.nichesoftware.co.nz/content/stylecop-cmd

Bevan
  • 43,618
  • 10
  • 81
  • 133
  • What limitation have you found in using TeamCity Pro vs CruiseControl since alls not free in TeamCity...? – Binoj Antony Nov 09 '09 at 09:28
  • 1
    TeamCity Professional is the free edition - it's limited to 20 build configurations and 3 build servers, which isn't much of a limitation at all. My work purchased the Enterprise edition to gain unlimited build configurations and LDAP integration. The 20 build configuration limit isn't going to limit many uses. All of the limitations I've run into are problems with CruiseControl: Lack of documentation, the need to hand-configure XML, lack of polish and so on. – Bevan Nov 09 '09 at 23:16
4

MSBuild Extension Pack

Supports StyleCop....

Adam Fyles
  • 6,030
  • 1
  • 23
  • 29
3

You don't need to do anyting specific for your CI product.
StyleCop integrates very well out-of-the-box:

You only need to do two things once:

  • put a few StyleCop files into your project folder (and into source control!)
  • add two lines to every .csproj file in your solution.

This makes StyleCop run on EVERY compile, no matter if done in Visual Studio or directly with MSBuild, on any machine, without having to install anything.

Any StyleCop rule violation will cause a compilation error, so the complete build will fail if your code doesn't adhere to StyleCop's rules.

Here's an explanation how to set this up: http://blogs.msdn.com/b/sourceanalysis/archive/2008/05/24/source-analysis-msbuild-integration.aspx (especially the last paragraph, "Team Development")

Christian Specht
  • 35,843
  • 15
  • 128
  • 182
3

Maybe this could help you: http://stylecopcmd.wiki.sourceforge.net/

Igor Brejc
  • 18,714
  • 13
  • 76
  • 95