Issue #3178534 by mondrake, klausi, alexpott, longwave, mallezie, Taran2L, mglaman, Spokje, kim.pepper, daffie, andypost, neclimdul, xjm, Gábor Hojtsy, cmlara: Start running PHPStan on Drupal core (level 0)
2022-01-18 09:34:31 +00:00
|
|
|
# Configuration file for PHPStan static code checking, see https://phpstan.org .
|
|
|
|
# PHPStan is triggered on Drupal CI in commit-code-check.sh.
|
|
|
|
includes:
|
|
|
|
- phpstan-baseline.neon
|
|
|
|
|
|
|
|
parameters:
|
|
|
|
|
|
|
|
level: 0
|
|
|
|
|
|
|
|
paths:
|
|
|
|
- .
|
|
|
|
- ../composer
|
|
|
|
|
|
|
|
excludePaths:
|
|
|
|
# Skip settings.
|
|
|
|
- ../*/settings*.php
|
|
|
|
# Skip test fixtures.
|
|
|
|
- */tests/fixtures/*.php
|
2022-01-31 14:45:01 +00:00
|
|
|
- */tests/fixtures/*.php.gz
|
2022-01-31 23:28:30 +00:00
|
|
|
# Skip data files.
|
|
|
|
- lib/Drupal/Component/Transliteration/data/*.php
|
Issue #3178534 by mondrake, klausi, alexpott, longwave, mallezie, Taran2L, mglaman, Spokje, kim.pepper, daffie, andypost, neclimdul, xjm, Gábor Hojtsy, cmlara: Start running PHPStan on Drupal core (level 0)
2022-01-18 09:34:31 +00:00
|
|
|
# Below extends on purpose a non existing class for testing.
|
|
|
|
- modules/system/tests/modules/plugin_test/src/Plugin/plugin_test/fruit/ExtendingNonInstalledClass.php
|
|
|
|
# @todo files below need to be excluded as they prevent baseline generation.
|
|
|
|
# Fixing them is a priority.
|
|
|
|
- modules/link/tests/src/Kernel/LinkItemTest.php
|
|
|
|
|
|
|
|
ignoreErrors:
|
|
|
|
# new static() is a best practice in Drupal, so we cannot fix that.
|
|
|
|
- "#^Unsafe usage of new static#"
|
|
|
|
|
|
|
|
# Ignore common errors for now.
|
|
|
|
- "#^Access to an undefined property#"
|
|
|
|
- "#^Call to an undefined method#"
|
|
|
|
- "#^Cannot unset offset#"
|
|
|
|
- "#should return .* but return statement is missing#"
|
|
|
|
- "#Drupal calls should be avoided in classes, use dependency injection instead#"
|
|
|
|
- "#^Plugin definitions cannot be altered.#"
|
|
|
|
- "#^Missing cache backend declaration for performance.#"
|
|
|
|
- "#cache tag might be unclear and does not contain the cache key in it.#"
|
|
|
|
- "#^Class .* extends @internal class#"
|