Skip to content

Commit

Permalink
Fixes PHPStan configuration (#216)
Browse files Browse the repository at this point in the history
  • Loading branch information
justafish committed Jun 20, 2023
1 parent be324a2 commit 1700d07
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
13 changes: 12 additions & 1 deletion scaffold/phpstan.neon
Original file line number Diff line number Diff line change
@@ -1,2 +1,13 @@
includes:
- vendor/lullabot/drainpipe-dev/config/phpstan.neon
- ../../../mglaman/phpstan-drupal/extension.neon
- ../../../phpstan/phpstan-deprecation-rules/rules.neon

parameters:
excludePaths:
- *sites/simpletest/*
- *default.settings.php
- *sites/*/files/*
- *settings.ddev.php
- */node_modules/*
# PHPStan Level 1
level: 1
8 changes: 6 additions & 2 deletions tasks/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -95,11 +95,15 @@ tasks:
- |
{{ .FUNC_ENSURE_DIRS }}
- |
CONFIG="phpstan.neon"
if [ ! -f phpstan.neon ]; then
CONFIG="vendor/lullabot/drainpipe/scaffold/phpstan.neon"
fi
if [ "{{.format}}" == "junit" ]; then
mkdir -p test_result
./vendor/bin/phpstan analyse --error-format=junit {{.TEST_DIRS}} > test_result/phpstan.xml
./vendor/bin/phpstan analyse --error-format=junit -c $CONFIG {{.TEST_DIRS}} > test_result/phpstan.xml
else
./vendor/bin/phpstan analyse {{.TEST_DIRS}}
./vendor/bin/phpstan analyse -c $CONFIG {{.TEST_DIRS}}
fi
phpunit:
desc: Runs PHPUnit
Expand Down

0 comments on commit 1700d07

Please sign in to comment.