Skip to content
Andrew Roslik edited this page Mar 11, 2016 · 3 revisions

CommitHooks

This application designed to organize code validation. In first it made for validation PHP code of Magento, but it supports PHP_CodeSniffer, joining of any code sniffer, like JSLint, CSSLint, etc.

Gitter The main purpose of this project is checking coding standards at first for PHP files.

Travis CI Travis Continuous Integration status.

Installation

Composer

This application added to Composer PHP package manager.

To install Composer you may follow the link https://getcomposer.org/download/. Just go to your home directory and follow the instructions therefrom. (Composer Intro)

For Windows

I dislike location of default global composer directory, that's why I would suggest to use following code to make it like in UNIX. This code designed for GIT Bash tool, and doesn't support Windows native command line.

echo 'export COMPOSER_HOME="~/.composer"' >> ~/.bashrc
echo 'export COMPOSER_CACHE_DIR="~/.composer/cache"' >> ~/.bashrc

In such case .composer directory will be placed in c:\Users\yourname\.composer Anyway, you may set it wherever you want.

Install composer package andkirby/commithook by command (you may put it into your global vendor directory):

$ composer global require andkirby/commithook

If you installed it globally, it would be useful to be able to run binary files from everywhere.

echo 'PATH=$PATH":${COMPOSER_HOME}/vendor/bin"' >> ~/.bashrc

Install hook files

And install...

$ cd myproject
$ commithook install

More info about installation.

Features

Release notes

You may find them in Readme file.