From b638792dd2e69807d20ed9cfb5aa43073bf7bb59 Mon Sep 17 00:00:00 2001 From: HorstOeko Date: Fri, 27 Dec 2024 15:12:32 +0100 Subject: [PATCH] [INFR] Added lint command to composer.json --- composer.json | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/composer.json b/composer.json index d0da5a2..d9a6476 100644 --- a/composer.json +++ b/composer.json @@ -76,6 +76,7 @@ "vendor/bin/phpstan analyze -c build/phpstan.neon --autoload-file=vendor/autoload.php --no-interaction --no-progress --error-format=checkstyle > build/logs/checkstyle_phpstan.xml", "vendor/bin/phpcpd --log-pmd build/logs/pmd-cpd.xml --exclude src/entities/ src" ], - "rector": "vendor/bin/rector --config=./build/phprectorconfig.php" + "rector": "vendor/bin/rector --config=./build/phprectorconfig.php", + "lint": "php -r 'echo PHP_VERSION_ID >= 80100 ? \"new\" : \"old\";' | xargs -I % sh -c 'if [ \"%\" = \"old\" ]; then find . \\( \\( -path \"./src*/*\" -not -path \"*codelistsenum*\" -not -path \"*codes*\" \\) -o -path \"./tests*/*\" \\) -type f -name \"*.php\" -exec php -l {} \\; ; else find . \\( \\( -path \"./src*/*\" -not -path \"*codes*\" \\) -o -path \"./tests*/*\" \\) -type f -name \"*.php\" -exec php -l {} \\; ; fi'" } }