[TYPO3-dev] SVN pre-commit hooks to avoid commiting php files with syntax errors
Martin Kutschker
masi-no at spam-typo3.org
Mon Sep 21 21:22:05 CEST 2009
Susanne Moog schrieb:
> Hi,
>
> Fabrizio Branca schrieb:
>> Hi there,
>>
>> today I played around with subversion's pre-commit hook. Checking php
>> syntax errors with php lint (which uses php's original parser) can be
>> used to avoid php files with syntax errors to be committed. Your client
>> will show a detailed custom error message why this submit was not accepted.
>
> I think instead of a syntax check (which is done by the IDE anyway)
> coding guideline checking would be more useful.
A syntax check prevents accidentally broken code.
> Perhaps with something
> like http://pear.php.net/package/PHP_CodeSniffer?
I don't think that a CGL violation should prohibit the commit (except
for the Core).
Masi
More information about the TYPO3-dev
mailing list