From 8cf8d2c16e6ef0b778755067ba9d2c109b6c967a Mon Sep 17 00:00:00 2001 From: Rumperuu Date: Sun, 25 Apr 2021 18:48:38 +0100 Subject: [PATCH] ci: clean up PHP linting commands If anyone has noticed me playing musical filepaths with these commands for a while, it's because I kept getting inconsistent results from the use of double-globs (i.e., `**`). However, I've finally figured out that this is because Composer is running these scripts in its own shell, so the double-glob that works when I run the command manually in my Terminal doesn't work when Composer runs it in its. --- composer.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index c3249ca..6418031 100644 --- a/composer.json +++ b/composer.json @@ -11,8 +11,8 @@ "lint:fix": "composer run lint:php:fix && npm run lint:fix", "format": "npm run format", "format:fix": "npm run format:fix", - "lint:php": "./vendor/bin/phpcs --standard=WordPress --colors --encoding=utf-8 -n -p ./src/*.php ./src/**/*.php && ./vendor/bin/phpcs --standard=PHPCompatibilityWP --runtime-set testVersion 7.0- --colors --encoding=utf-8 -n -p ./src/*.php ./src/**/*.php", - "lint:php:fix": "./vendor/bin/phpcbf --standard=WordPress --encoding=utf-8 -p ./src/*.php ./src/**/*.php && ./vendor/bin/phpcbf --standard=PHPCompatibilityWP --runtime-set testVersion 7.0- --encoding=utf-8 -p ./src/*.php ./src/**/*.php", + "lint:php": "./vendor/bin/phpcs --standard=WordPress,PHPCompatibilityWP --runtime-set testVersion 7.0- --colors --encoding=utf-8 -p ./src/*.php ./src/*/*.php ./src/*/*/*.php", + "lint:php:fix": "./vendor/bin/phpcbf --standard=WordPress,PHPCompatibilityWP --runtime-set testVersion 7.0- --colors --encoding=utf-8 -p ./src/*.php ./src/*/*.php ./src/*/*/*.php", "lint:css": "npm run lint:css", "lint:css:fix": "npm run lint:css:fix", "lint:js": "npm run lint:js",