fix: fix pre-commit hook

This commit is contained in:
Ben Goldsworthy 2021-04-16 03:12:06 +01:00
parent f010c175ed
commit d676f6d53f

View file

@ -36,12 +36,12 @@ done
#then #then
# RULESET="$PROJECT/phpcs.xml.dist" # RULESET="$PROJECT/phpcs.xml.dist"
#else #else
RULESETS=("WordPress" "PHPCompatibilityWP") #
#fi #fi
if [ "$FILES" != "" ] if [ "$FILES" != "" ]
then then
for RULESET in $RULESETS; do for RULESET in WordPress PHPCompatibilityWP; do
echo "Checking Code Standard Compliance, using $RULESET as ruleset standard..." echo "Checking Code Standard Compliance, using $RULESET as ruleset standard..."
./vendor/bin/phpcs --standard="$RULESET" --runtime-set testVersion 7.0- --colors --encoding=utf-8 -n -p $FILES ./vendor/bin/phpcs --standard="$RULESET" --runtime-set testVersion 7.0- --colors --encoding=utf-8 -n -p $FILES
if [ $? != 0 ] if [ $? != 0 ]