Last active
September 4, 2017 17:41
-
-
Save SergeAx/63c836c0eb39a99f700d4031a8f50d73 to your computer and use it in GitHub Desktop.
Put this file into path directory and use as "git phpcs" (Works in Windows, put script to C:\Program Files\Git\cmd\)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
ROOT=$(git rev-parse --show-toplevel); | |
FILES=$(git diff HEAD --name-only); | |
if [ ! -z "$FILES" ]; then | |
for FILE in $FILES; do | |
phpcs $ROOT/$FILE | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment