定制 juizmill/git-hooks 二次开发

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

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

juizmill/git-hooks

Composer 安装命令:

composer require juizmill/git-hooks

包简介

Git Hooks

README 文档

README

Checks list

  • 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.

PHPCsFix

PHPLint

PHPUnit

INSTALLATION:

The recommended way to install this library is through Composer:

add juizmill/git-hooks as a composer dependency.

composer.json

"require-dev": {
    ...
    "juizmill/git-hooks": "dev-master"
}

php composer.phar update juizmill/git-hooks

USAGE:

When a developer clones the project, it just needs to:

Edit composer.json and add:

    "scripts": {
        "pre-update-cmd": "GitHooks\\Composer\\Script\\Hooks::preHooks",
        "pre-install-cmd": "GitHooks\\Composer\\Script\\Hooks::preHooks",
        "post-update-cmd": "GitHooks\\Composer\\Script\\Hooks::postHooks",
        "post-install-cmd": "GitHooks\\Composer\\Script\\Hooks::postHooks"
    }

Remembering to set up the hooks

Custom config

Copy arquives vendor/juizmill/git-hooks/config/* to [project]

Reference

Write your git hooks in PHP and keep them under git control

PHP_CodeSniffer

PHP-CS-FIX

PHPMD

Custom PHPCS and PHPMD

统计信息

  • 总下载量: 33
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 28
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 28
  • Watchers: 4
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-11-21

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固