Updated phpcs.sh

This commit is contained in:
Claudio Sanches 2017-10-09 22:16:25 -03:00
parent b62b954f19
commit 01cafe62d8
1 changed files with 2 additions and 6 deletions

View File

@ -6,15 +6,11 @@ if [[ $TRAVIS_PHP_VERSION == '7.1' ]]; then
CHANGED_FILES=`git diff --name-only --diff-filter=ACMR $TRAVIS_COMMIT_RANGE | grep \\\\.php | awk '{print}' ORS=' '`
IGNORE="tests/cli/,apigen/,includes/gateways/simplify-commerce/includes/,includes/libraries/,includes/api/legacy/"
if [ "$CHANGED_FILES" != "" ]
then
if [ "$CHANGED_FILES" != "" ]; then
echo "Running Code Sniffer."
./vendor/bin/phpcs --ignore=$IGNORE --standard=./phpcs.ruleset.xml --encoding=utf-8 -n -p $CHANGED_FILES
if [ $? != 0 ]
then
if [ $? != 0 ]; then
exit 1
fi
fi
exit $?
if