snapp-food/git-phpcs 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

snapp-food/git-phpcs

Composer 安装命令:

composer require snapp-food/git-phpcs

包简介

Diff Sniffer for Git

README 文档

README

PHP Version Latest Stable Version Scrutinizer Code Quality Code Coverage Build Status Appveyor Build Status

This tool allows you using PHP_CodeSniffer as a pre-commit hook. The main difference from existing solutions that this one validates only changed lines of code but not the whole source tree.

Installation

Diff Sniffer is already built as a PHAR package. All you need is download it and install as a pre-commit hook.

$ wget https://github.com/diff-sniffer/git/releases/download/0.1.0/pre-commit.phar
$ chmod +x pre-commit.phar
$ mv pre-commit.phar /path/to/repo/.git/hooks/pre-commit

Alternatively, you can install the hook globally for a user (see man githooks):

$ git config --global core.hooksPath '~/.git/hooks' # choose a path if you already haven't
$ chmod +x pre-commit.phar
$ mv pre-commit.phar ~/.git/hooks/pre-commit

You can also install Diff Sniffer manually:

$ git clone git@github.com:diff-sniffer/git.git
$ cd diff-sniffer-pre-commit
$ composer install
$ bin/pre-commit --version

Continuous integration mode

Diff Sniffer for Git can also run on a CI server and validate pull requests. For example, on Travis CI:

$ wget https://github.com/diff-sniffer/git/releases/download/0.1.0/git-phpcs.phar
$ php git-phpcs.phar origin/$TRAVIS_BRANCH...$TRAVIS_PULL_REQUEST_SHA

Configuration

By default, the PHAR distribution uses the PSR2 coding standard. The configuration may be overridden by creating configuration file file in the project root.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 6
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-05-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固