2018-09-21 13:06:16 +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=' '`
|
|
|
|
|
|
|
|
if [ "$CHANGED_FILES" != "" ]; then
|
|
|
|
echo "Running Code Sniffer."
|
2018-11-02 14:27:03 +00:00
|
|
|
cd "$WP_CORE_DIR/wp-content/plugins/wc-admin/"
|
2018-09-21 18:51:41 +00:00
|
|
|
./vendor/bin/phpcs --encoding=utf-8 -n -p $CHANGED_FILES
|
2018-09-21 13:06:16 +00:00
|
|
|
fi
|
|
|
|
fi
|