[TYPO3-dev] SVN pre-commit hooks to avoid commiting php files with syntax errors
Dmitry Dulepov
dmitry.dulepov at gmail.com
Wed Sep 23 14:41:45 CEST 2009
Hi!
Martin Kutschker wrote:
> 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
Firsts, it is developer's discipline. If the developer is not disciplined enough to put correct code, he should not be given the access at all. When you have time, read this: http://michaelbraude.blogspot.com/2009/05/why-ill-never-be-web-guy.html. This article is an extreme opinion but I agree with it in many points. Having a good C and Java programming background, I see lots of truth in that article.
I strongly believe in quality. So if the developer does not check what he commits, it is not even close to quality. We truly do not need such developers anywhere near our SVN.
Secondly, as I said before: these checks do not allow to commit pseudocode and seriously limit developer's freedom. Subversion is a developer tool and only developers can define how they use it. Nobody should enforce it for developer's project except for the developer himself. For the core team it is definitely not necessary because we have reviews. For other projects, it should be optional: let developers decide how they want to use SVN.
I am for freedom together with self–discipline. That's all. It is the best choice that I see.
> 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.
Usually it does. I saw autoformatting for PHP implemented in three places. I have no information what tool was used but it worked well.
--
Dmitry Dulepov
Facebook: http://www.facebook.com/dmitryd
Twitter: http://twitter.com/dmitryd
Skype: liels_bugs
More information about the TYPO3-dev
mailing list