jv-testes/pre-commit
最新稳定版本:1.2.6
Composer 安装命令:
composer require jv-testes/pre-commit
包简介
Pre-commit hook
README 文档
README
Checks in our pre-commit hook
- Syntax check with php lint (“php -l”): We check every committed file has a valid PHP syntax.
- Sync check of composer.json and composer.lock files: We check these two files are committed together in order to avoid committing the json but not the lock and generate some issue to another developers.
- PHP CS Fixer check: With the –dry-run parameter it does not fix, just say what the problems are. With the –fixers parameter you can control what fixers you want to execute.
- PHP Code Sniffer check: Same as before, but another rule that checks another rules.
- PHPMD: We have enabled the controversial rules.
- Unit Testing check: We run around 3.000 tests right now.
INSTALLATION:
The recommended way to install this library is through Composer:
add jv-testes/pre-commit as a composer dependency.
composer.json
"require-dev": { ... "jv-testes/pre-commit": ">=1.2.3" }
USAGE:
When a developer clones the project, it just needs to:
Edit composer.json and add:
"scripts": {
"pre-update-cmd": "PreCommit\\Composer\\Script\\Hooks::preHooks",
"pre-install-cmd": "PreCommit\\Composer\\Script\\Hooks::preHooks",
"post-update-cmd": "PreCommit\\Composer\\Script\\Hooks::postHooks",
"post-install-cmd": "PreCommit\\Composer\\Script\\Hooks::postHooks"
}
Remembering to set up the hooks
Custom config
Copy arquives vendor/jv-testes/pre-commit/config/* to [project]
Reference
统计信息
- 总下载量: 46
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 1
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-13


