Skip to content
Snippets Groups Projects
Verified Commit 9b9a4ad2 authored by Bartek Jaskulski's avatar Bartek Jaskulski
Browse files

refactor: remove hardcoded phpstan level, let project control


Signed-off-by: default avatarBart Jaskulski <bjaskulski@protonmail.com>
parent c14dedf8
No related branches found
No related tags found
No related merge requests found
...@@ -9,12 +9,12 @@ phpstan: ...@@ -9,12 +9,12 @@ phpstan:
script: script:
- | - |
if [ -f "vendor/bin/phpstan" ]; then if [ -f "vendor/bin/phpstan" ]; then
vendor/bin/phpstan analyse --level 5 --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true vendor/bin/phpstan analyse --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
vendor/bin/phpstan analyse --level 5 --error-format=junit --memory-limit=2G > phpstan-junit.xml vendor/bin/phpstan analyse --error-format=junit --memory-limit=2G > phpstan-junit.xml
elif [ -f "vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan" ]; then elif [ -f "vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan" ]; then
# PHPStan installed by director # PHPStan installed by director
vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --level 5 --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --error-format=gitlab --memory-limit=2G > phpstan-codequality.json || true
vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --level 5 --error-format=junit --memory-limit=2G > phpstan-junit.xml vendor/wpdesk/wp-wpdesk-composer/director/vendor/bin/phpstan analyse --error-format=junit --memory-limit=2G > phpstan-junit.xml
else else
echo "PHPStan not found! Install it with 'composer require --dev wpdesk/phpstan-rules'." echo "PHPStan not found! Install it with 'composer require --dev wpdesk/phpstan-rules'."
exit 125 exit 125
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment