philwc / code-quality
Code quality pre commit hook
dev-master
2014-08-06 07:31 UTC
Requires
- phpmd/phpmd: 2.0.*
- phpunit/phpunit: 4.1.*
- symfony/console: 2.5.*
- symfony/finder: 2.5.*
- symfony/process: 2.5.*
- zerkalica/phpcs: dev-master
This package is not auto-updated.
Last update: 2025-01-14 02:48:21 UTC
README
This is based on the blog post at http://carlosbuenosvinos.com/write-your-git-hooks-in-php-and-keep-them-under-git-control/
The quality tools are specified in composer and will be automatically downloaded.
To Use
Add the package as a requirement:
"require": {
"philwc/code-quality": "dev-master",
}
Add the scripts to your root comnposer.json (If you want to be notified about the hook not being installed)
"scripts": {
"pre-update-cmd": "philwc\\Hooks::checkHooks",
"pre-install-cmd": "philwc\\Hooks::checkHooks"
}
Install the hook
rm -rf .git/hooks && ln -s ../vendor/philwc/code-quality/src/hooks ./.git/hooks