Stop installing PHPCS globally in the Travis build job

PHPCS is already installed as a project dependency (we run `composer
install` for each build job) so there is no need to install it as a
global package in `tests/bin/phpcs.sh`.
This commit is contained in:
Rodrigo Primo 2020-10-16 16:29:13 -03:00
parent eaef2409bd
commit 17471f8f66
1 changed files with 0 additions and 5 deletions

View File

@ -5,11 +5,6 @@ if [[ ${RUN_PHPCS} == 1 ]]; then
IGNORE="tests/cli/,includes/libraries/,includes/api/legacy/" IGNORE="tests/cli/,includes/libraries/,includes/api/legacy/"
if [ "$CHANGED_FILES" != "" ]; then if [ "$CHANGED_FILES" != "" ]; then
if [ ! -f "./vendor/bin/phpcs" ]; then
# Install wpcs globally
composer global require woocommerce/woocommerce-sniffs --update-with-all-dependencies
fi
echo "Running Code Sniffer." echo "Running Code Sniffer."
vendor/bin/phpcs --ignore=$IGNORE --encoding=utf-8 -s -n -p $CHANGED_FILES vendor/bin/phpcs --ignore=$IGNORE --encoding=utf-8 -s -n -p $CHANGED_FILES
fi fi