This project is read-only.
Project Description
SVNStyleCop utility allows to integrate StyleCop with SVN server. This utility will run StlyeCop for every committed file (in pre-commit hook) and roll back commit if violation occurs. Detailed violation report sent back to the client.

commit-failed.gif

How to install:

Setup SVNStyleCop
  1. Download archive and unpack it anywhere on SVN server
  2. Set valid path to svnlook.exe in SVNStyleCop.exe.config file
  3. Replace SVNSettings.StyleCop with your standards if needed
  4. Add path patterns to pathPatterns group in SVNStyleCop.exe.config file. It should be a valid regex. Example:
        <pathPatterns>
            <clear />
            <add value="^SalesManager/.*\.cs$"/>
            <add value="^Utilites/.*\.cs$"/>
        </pathPatterns>
will analyze all *.cs files that about to be committed to SalesManager and Utiltes folder on SVN server (autogenerated files will not be analyzed according to SVNSettings.StyleCop file).

Setup hook
  1. Set valid path to SVNStyleCop.exe and svnlook.exe in pre-commit.cmd
  2. Move pre-commit.cmd to the hooks folder of your SVN repository. It also enables comments to be required. You can comment corresponding lines in pre-commit.cmd if it is not needed.

Now you can be sure that nobody will commit files with StyleCop violations!

Last edited Sep 17, 2009 at 8:48 AM by shtin, version 5