Skip to content

Commit d376e83

Browse files
committed
fix for the bug
2 parents f39b941 + 56ad434 commit d376e83

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
# PHPCS git pre-commit hook
1+
# Universal PHPCS git pre-commit hook
22

33
## About
44

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

8-
Inspired by [Enforce code standards with composer, git hooks, and phpcs](http://tech.zumba.com/2014/04/14/control-code-quality/)
8+
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.
99

1010
## Installation
1111

src/setup.sh

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@ else
77
PRE_COMMIT_EXISTS=0
88
fi
99

10+
if [ ! -d .git/hooks ]; then
11+
mkdir -p .git/hooks
12+
fi
13+
1014
cp vendor/wickedreports/phpcs-pre-commit-hook/src/pre-commit .git/hooks/pre-commit
1115
chmod +x .git/hooks/pre-commit
1216

@@ -15,4 +19,4 @@ then
1519
echo "Pre-commit git hook is installed!"
1620
else
1721
echo "Pre-commit git hook is updated!"
18-
fi
22+
fi

0 commit comments

Comments
 (0)