定制 aydin-hassan/php-git-hooks 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

aydin-hassan/php-git-hooks

Composer 安装命令:

composer require aydin-hassan/php-git-hooks

包简介

Some simple git hooks to run a variety of PHP analysis tools, including PHPUnit

README 文档

README

Latest Stable Version Latest Unstable Version

This project contains some simple scripts to run Unit tests and static analysis tools before allowing a commit.

Currently the tool will run:

  1. PHPUnit
  2. PHP Copy Paste Detector
  3. PHP Code Sniffer

The tool will only run phpcs on modified files where phpcpd will be run against all files. PHPUnit will be run if there if a phpunit.xml or phpunit.xml.dist file in the root of the project.

PHP Code Sniffer will be run with ps2 coding standard and warning will be ingored (eg line limits)

This script will look for binaries in either the project's vendor/bin directory first and will fall back to ~/.composer/vendor/bin so make sure the tools are installed with composer.

See PHP-FIG for the coding standards.

Install tools

composer global require 'phpunit/phpunit:3.7.*'
composer global require 'squizlabs/php_codesniffer:1.5.1'
composer global require 'sebastian/phpcpd=2.0.0'

Install hooks

composer global require 'aydin-hassan/php-git-hooks:0.1.0-beta3'
cd ~/.composer/vendor/aydin-hassan/php-git-hooks
./install.sh

If you have any existing repositories you should run git init in the root of the repo to enable the hooks in them. All new repos will inherit the hooks.

Done

Everytime you commit something from any newly cloned/ created repository these checks will be executed!

Todo

  • Figure out how to execute global hooks if local repo hooks are defined

统计信息

  • 总下载量: 14
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 8
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 8
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GPL
  • 更新时间: 2014-01-23

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固