"Aryeh Gregor" <Simetrical+wikilist(a)gmail.com> wrote in message
news:AANLkTi=sGDvuc7f4r_USFYA7E=ceCfSe7BY-TxCn3MS2@mail.gmail.com...
On Tue, Nov 30, 2010 at 10:04 AM, Chad
<innocentkiller(a)gmail.com> wrote:
All changed/added files ending in .inc/.php/.php5
are now
checked with php -l prior to the transaction completing. You
should get a fun error message on your local console if you
commit bad code :)
This assumes that all .inc files are actually PHP. Probably they are
right now, but I can foresee this potentially breaking years down the
line and confusing someone. Maybe for .inc files, you should check if
they start with "<?php" before trying php -l.
Surely if there is no opening <?php tag then there is no parsing todo, and
therefore the file will always pass validation.
You may need to set short_open_tag to false to enforce this, I guess (it's
good practice, anyhow, so that'd be no bad thing).
- Mark Clements (HappyDog)