Skip to content

Commit

Permalink
[INFR] Added lint command to composer.json
Browse files Browse the repository at this point in the history
  • Loading branch information
HorstOeko committed Dec 27, 2024
1 parent 86b819b commit b638792
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -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'"
}
}

0 comments on commit b638792

Please sign in to comment.