splotches/php-composter-phpmd
Composer 安装命令:
composer require splotches/php-composter-phpmd
包简介
Automatically install a git pre-commit hook to check your PHP files upon each commit to make sure they follow the rules defined in phpmd.xml.
README 文档
README
Automatically install a git pre-commit hook to check your PHP files upon each commit to make sure they follow the rules defined in phpmd.xml.
Table Of Contents
Installation
Add as a development requirement to your composer.json:
composer require --dev pascal-splotches/php-composter-phpmd
Usage
It automatically works whenever you execute a git commit.
Configuration
You need to add a configuration section to your phpmd.xml ruleset with the correct flags and paths:
<configuration> <!-- Required --> <source> <path>src</path> <!-- <path></path>... --> </source> <!-- Optional --> <exclude> <path>docs</path> <!-- <path></path>... --> </exclude> <!-- Required --> <output mode="text"/> <!-- Optional --> <minimum-priority value="5"/> <report file="report.txt"/> <!-- Optional --> <suffixes> <suffix>php</suffix> <!-- <suffix></suffix>... --> </suffixes> <!-- Optional --> <strict/> </configuration>
Built With
Contributing
All feedback, bug reports and pull requests are welcomed.
Versioning
We use SemVer for versioning. For the versions available, see the releases on this repository.
Authors
- Pascal Scheepers pascal@splotch.es
License
This project is licensed under the GPL v3 License - see the LICENSE file for details.
统计信息
- 总下载量: 26
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GPL-3.0-only
- 更新时间: 2018-09-27