A few weeks ago I wrote subversion hook-script that checks Perl code using Perl::Critic module --- perlcritic-checker.pl If the code has violations then the entire commit will be rejected. The appropriate error message (colored and sorted by severity level) will be sent back to the client. This way you can employ consistent coding rules in your team.
The script can be configured to apply different Perl::Critic policy profiles for different paths in the repository. For example, you can be very strict with brand new projects, make an indulgence for legacy projects and completely disable Perl::Critic for auto-generated and third-party code.
The code and configuration file examples can be downloaded from http://entropyware.info/perlcritic/perlcritic-checker.tar.gz
I appreciate any feedback from you guys!
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Using Perl::Critic in Subversion hook script
by Anonymous Monk on Dec 01, 2009 at 08:23 UTC | |
by xdr (Acolyte) on Dec 01, 2009 at 14:20 UTC | |
by xdr (Acolyte) on Jun 06, 2010 at 17:19 UTC | |
|
Don't do this.
by elliot (Novice) on Feb 17, 2010 at 02:41 UTC | |
by xdr (Acolyte) on Feb 17, 2010 at 13:43 UTC | |
|
Re: Using Perl::Critic in Subversion hook script
by danb (Friar) on Dec 01, 2009 at 22:31 UTC |