Subversion Commit Hooks for PHP

by Nicolas Ruflin, Sonntag, 3. Mai 2009

Matthew Turland writes in his article Subversion Commit Hooks for PHP about how to implement subversion hooks to check for example if all commited code is valid PHP code.

First, the pre-commit hook. Its purpose is to perform a PHP lint check (as in the -l flag when using PHP from the command line) to ensure that PHP files being committed contain no syntax errors. When I received this task, I actually already had a copy of a pre-commit script to do this that Elizabeth Smith graciously provided to me ages ago. The script is written in bash and my skill level with the associated shell scripting language is admittedly rather low, as is my experience in creating and setting up Subversion hook scripts in general.

Links

Kommentare

Schreiben Sie einen Kommentar