Steven
Steven

Reputation: 2558

How to use StyleCop from command line?

Is there a way to use StyleCop 4.5 from the command line on an individual source file, like stylecop HelloWorld.cs?

Upvotes: 7

Views: 9813

Answers (5)

James Bradt
James Bradt

Reputation: 644

To revive an old thread...

https://github.com/Nylle/StyleCop.Console seems to fit the job nicely.

Upvotes: 6

Cygon
Cygon

Reputation: 9620

There's also StyleCopCmd, a command-line wrapper and NAnt task for StyleCop.

Upvotes: 1

Oleg Shuruev
Oleg Shuruev

Reputation: 1349

Here is also an article descibing how to create a simple C# console app running StyleCop over specified file.

Feel free to create your own runner which will be able to process results in any way you want.

Upvotes: 3

Bernard
Bernard

Reputation: 7961

There is this project available on SourceForge.net that you can use from the command-line.

Upvotes: 2

Christopher Currens
Christopher Currens

Reputation: 30745

You can't. It's not a feature of stylecop, it only integrates with VS2008/2010 and MsBuild

There is this project at sourceforge that may do what you're looking for. DISCLAIMER: I have not tried it.

Upvotes: 5

Related Questions