2017-25 © Pedro Peláez
 

library git-phpcs

Diff Sniffer for Git

image

snapp-food/git-phpcs

Diff Sniffer for Git

  • Monday, May 28, 2018
  • by modiamir
  • Repository
  • 1 Watchers
  • 0 Stars
  • 4 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 1 Forks
  • 0 Open issues
  • 4 Versions
  • 0 % Grown

The README.md

Diff Sniffer for Git

PHP Version Latest Stable Version Scrutinizer Code Quality Code Coverage Build Status Appveyor Build Status, (*1)

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., (*2)

Installation

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

$ 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):, (*4)

$ 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:, (*5)

$ 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:, (*6)

$ 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)

The Versions

28/05 2018

dev-master

9999999-dev

Diff Sniffer for Git

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sergei Morozov

28/05 2018

0.1.2

0.1.2.0

Diff Sniffer for Git

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sergei Morozov

13/05 2018

0.1.1

0.1.1.0

Diff Sniffer for Git

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sergei Morozov

17/12 2017

0.1.0

0.1.0.0

Diff Sniffer for Git

  Sources   Download

MIT

The Requires

 

The Development Requires

by Sergei Morozov