StyleCop.Baboon
StyleCop.Baboon copied to clipboard
A command line runner for StyleCop that runs anywhere
StyleCop.Baboon - StyleCop working anywhere
StyleCop.Baboon helps you to fix StyleCop problems without an IDE and from any OS that runs C#.
Installation / Usage
-
Clone this repository with '--recursive' flag or run 'git submodule update --init' to clone the StyleCop submodule too.
-
Build the solution.
$ nuget restore
$ msbuild "StyleCop.Baboon.sln"
-
Use your custom StyleCop settings to analyze a file or a directory. This will generate
StyleCopViolations.xmlfile.$ [mono] StyleCop.Baboon.exe Settings.StyleCop StyleCop.Baboon/Program.cs -
Enjoy! Fix StyleCop's complaints and stay on the line to avoid more complaints.
Global installation of StyleCop.Baboon (Linux only)
-
Follow instructions here.
-
On the command line:
$ mkdir -p /usr/local/opt/StyleCop.Baboon $ cp [dir-that-baboon-was-built]/bin/Debug/* /usr/local/opt/StyleCop.Baboon/ $ printf '%s\n%s' '#!/bin/bash' 'exec $(which mono) /usr/local/opt/StyleCop.Baboon/StyleCop.Baboon.exe "$@"' > /usr/local/bin/StyleCop.Baboon $ chmod a+x /usr/local/bin/StyleCop.Baboon -
Now
StyleCop.Baboonshould be available in your$PATH!
Using along with Jenkins
This was the motivation to create this project!
Jenkins Violations plugin supports StyleCop and you can use StyleCop.Baboon to generate the xml file that will be used by the plugin.
Author
Nelson Senna - https://twitter.com/nelson_senna - http://nelsonsar.github.io
License
StyleCop.Baboon is licensed under the MIT License - see the LICENSE file for details