woocommerce/unit-tests/bin/phpcs.sh

12 lines
325 B
Bash
Raw Normal View History

2019-06-10 16:09:42 +00:00
#!/usr/bin/env bash
if [[ ${RUN_PHPCS} == 1 ]]; then
CHANGED_FILES=`git diff --name-only --diff-filter=ACMR $TRAVIS_COMMIT_RANGE | grep \\\\.php | awk '{print}' ORS=' '`
IGNORE=""
if [ "$CHANGED_FILES" != "" ]; then
echo "Running Code Sniffer."
2019-06-11 10:05:53 +00:00
phpcs --ignore=$IGNORE --encoding=utf-8 -s -n -p $CHANGED_FILES
2019-06-10 16:09:42 +00:00
fi
fi