Skip to content

Commit

Permalink
fix for the bug
Browse files Browse the repository at this point in the history
  • Loading branch information
stanma committed Mar 13, 2018
2 parents f39b941 + 56ad434 commit d376e83
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
# PHPCS git pre-commit hook
# Universal PHPCS git pre-commit hook

## About

Auto installed git pre-commit hook for running [PHP Code Sniffer](https://github.com/squizlabs/PHP_CodeSniffer)
code checking to PSR2 coding standard compliance. It checks only files that are to be committed.

Inspired by [Enforce code standards with composer, git hooks, and phpcs](http://tech.zumba.com/2014/04/14/control-code-quality/)
Inspired by [Enforce code standards with composer, git hooks, and phpcs](http://tech.zumba.com/2014/04/14/control-code-quality/) and https://github.com/smgladkovskiy/phpcs-git-pre-commit and https://gist.github.com/BrizzleRocker/62ed61b37acf05344d4bce894e719251 . Installer checks OS on hosting machine and installs needed hooks for platform.

## Installation

Expand Down
6 changes: 5 additions & 1 deletion src/setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ else
PRE_COMMIT_EXISTS=0
fi

if [ ! -d .git/hooks ]; then
mkdir -p .git/hooks
fi

cp vendor/wickedreports/phpcs-pre-commit-hook/src/pre-commit .git/hooks/pre-commit
chmod +x .git/hooks/pre-commit

Expand All @@ -15,4 +19,4 @@ then
echo "Pre-commit git hook is installed!"
else
echo "Pre-commit git hook is updated!"
fi
fi

0 comments on commit d376e83

Please sign in to comment.