[TYPO3-dev] SVN pre-commit hooks to avoid commiting php files with syntax errors

Martin Kutschker masi-no at spam-typo3.org
Wed Sep 23 13:15:12 CEST 2009


Dmitry Dulepov schrieb:
> Hi!
> 
> Ries van Twisk wrote:
>> Syntax check is the most un-useful feature for such a item,
>> all IDE's should already warn you (and they do...) for syntax errors.
> 
> +1.

I don't understand why both of you do not want the Core repository from
broken PHP. Yes, it shouldn't happen and the developer should (by
whatever means) make sure only valid code enters the

> > More useful would be for CGL check and run a unit test if
> > appropriate for the code be checked in....
>
> +1000!!! Or even reformat the code according to CGL.

Unit testing is a nice. But how is the test to be run before the commit?

As for auto-formatting: does this work safyely. I mean, is there no
chance that the code is broken (or changed semantically) after a an
auto-format? Anyway, if applied the syntax check must be done after the
auto-formatting.

Masi




More information about the TYPO3-dev mailing list