-
-
Save aristath/9b2696a87e14110d02f116994f334440 to your computer and use it in GitHub Desktop.
Runs PHPCS on changed files only
This file contains 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
if [ $# -lt 0 ]; then | |
echo "------------------------" | |
echo "usage: $0 \$1" | |
echo " \$1: Files to check" | |
echo "------------------------" | |
exit 1 | |
fi | |
if [ "$#" == 1 ] | |
then | |
files=$1; | |
else | |
files=$(git ls-files -om --exclude-standard); | |
fi | |
./vendor/bin/phpcs --runtime-set testVersion 5.6- $files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment