mirror of
https://github.com/opdavies/build-configs.git
synced 2025-09-05 19:05:33 +01:00
Allow for running PHPStan on test files and not
...ignoring them within the PHPStan configuration file
This commit is contained in:
parent
7c17007d84
commit
87c2f2e496
3 changed files with 7 additions and 0 deletions
|
@ -2,6 +2,7 @@ drupal:
|
||||||
docroot: web
|
docroot: web
|
||||||
|
|
||||||
experimental:
|
experimental:
|
||||||
|
runStaticAnalysisOnTests: false
|
||||||
useNewDatabaseCredentials: true
|
useNewDatabaseCredentials: true
|
||||||
|
|
||||||
project_root: /app
|
project_root: /app
|
||||||
|
|
|
@ -120,6 +120,10 @@ final class Config
|
||||||
new Assert\Type('bool'),
|
new Assert\Type('bool'),
|
||||||
]),
|
]),
|
||||||
|
|
||||||
|
'runStaticAnalysisOnTests' => new Assert\Optional([
|
||||||
|
new Assert\Type('bool'),
|
||||||
|
]),
|
||||||
|
|
||||||
// TODO: remove this when its been removed from all `build.yaml` files.
|
// TODO: remove this when its been removed from all `build.yaml` files.
|
||||||
'useNewDatabaseCredentials' => new Assert\Optional([
|
'useNewDatabaseCredentials' => new Assert\Optional([
|
||||||
new Assert\Type('bool'),
|
new Assert\Type('bool'),
|
||||||
|
|
|
@ -2,9 +2,11 @@
|
||||||
|
|
||||||
parameters:
|
parameters:
|
||||||
level: {{ php.phpstan.level }}
|
level: {{ php.phpstan.level }}
|
||||||
|
{% if not experimental.runStaticAnalysisOnTests %}
|
||||||
excludePaths:
|
excludePaths:
|
||||||
- *Test.php
|
- *Test.php
|
||||||
- *TestBase.php
|
- *TestBase.php
|
||||||
|
{% endif %}
|
||||||
paths:
|
paths:
|
||||||
{% for path in php.phpstan.paths -%}
|
{% for path in php.phpstan.paths -%}
|
||||||
- {{ path }}
|
- {{ path }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue