StyleCop is a C# source code convention checker - a tool you can (and should) use to ensure that all the C# source code being written by your team is structured in a consistent and readable stye.
StyleCop Cmd is a simple commandline version, allowing you to integrate StyleCop with other build tools like NAnt and with continuous integration suites like CruiseControl.Net and TeamCity.
Released in May 2008 by Microsoft, it appears that StyleCop has been in internal use for some years. The Visual Studio integration is superb, as is the integration into MSBuild.
StyleCop.cmd is a simple command line driver that invokes the StyleCop SourceAnalysis engine to analyse C# source code.
The download is source code only - you'll have to compile it yourself with Visual Studio. Error handling is only rudimentary - plenty of room for improvement.
Not quite what you're looking for? Check out StyleCopCmd, an independent project with the same name (and similar intent) as this tool.
Use the -settings flag to identify a Settings.SourceAnalysis file to control the analysis. If you omit this setting, the analysis engine will crash.
After -settings, pass the names of any files you want to analyse. If you list a .csproj file, all of the .cs files compiled by the project will be included for analysis.
Normal logging is to the console, but can be redirected to an xml file by the -xml option.
Source for StyleCop Cmd is under the MIT license. You are free to use and adapt the source in your own applications.
New Release of StyleCop Cmd | 19 Sep 2010 |
Why use StyleCop? | 01 Aug 2008 |
Stylecop Documentation and Supression | 01 Aug 2008 |
StyleCop Cmd Updated | 27 Jul 2008 |
Living with StyleCop | 25 Jul 2008 |
Announcing StyleCop.cmd | 01 Jul 2008 |
More on StyleCop | 30 Jun 2008 |
StyleCop for C# Coding Standards | 28 Jun 2008 |