News Feed
Sections




News Archive
Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Christian Weiske's Blog:
How to integrate PHP_CodeSniffer with Git repositories?
May 27, 2011 @ 11:16:48

Christian Weiske has a problem he hopes you can help with - he's trying to get the PHP_Codesniffer tool integrated into his git workflow (well, the workflow of his team) as an automatic process that runs on commit. Unfortunately he's having some issues.

At work, we used a SVN server and enforced our project coding standard with a pre-commit hook on the server that ran PHP_CodeSniffer. Whenever a developer tried to commit some code that does not match the standard, he got it rejected. [...] The only way to enforce the standard is a pre-receive hook on our central Git repository server that all devs push to. Just installing the SVN hook on it isn't the solution, though.

Because of how git handles commits (possibly multiple in one push) the usual methods won't work. Other tricky things like file renaming and allowing for legacy code check-ins are also needed. He's posted the question on StackOverflow too, but no one's come up with a good answer yet (at the time of this post).

0 comments voice your opinion now!
git phpcodesniffer codesniffer commit hook stackoverflow


blog comments powered by Disqus

Similar Posts

Felix Geisendörfer's Blog: Welcome to the Dark Side of Plugins in CakePHP

DZone.com: PHP Tool Integration (PHPsrc)

ServerGrove Blog: Symfony + Git + Capistrano = Capifony

Stefan Priebsch's Blog: Custom Coding Standards with PHP_CodeSniffer

David Coallier's Blog: Namespaces has PHP 5.3 (Or the other way around)


Community Events





Don't see your event here?
Let us know!


introduction voicesoftheelephpant release api laravel developer conference symfony bugfix community deployment series language podcast list framework zendserver tips interview library

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework