Issue #3426548 by Kingdutch, andypost, longwave, catch, mstrelan, alexpott: Convert the PHPStan baseline from NEON to PHP
parent
ac8556f35e
commit
9b890f0414
|
|
@ -42,6 +42,9 @@
|
|||
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
|
||||
|
||||
# PHPStan's baseline uses tabs instead of spaces.
|
||||
core/.phpstan-baseline.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tabwidth=2 diff=php linguist-language=php
|
||||
|
||||
# Define binary file attributes.
|
||||
# - Do not treat them as text.
|
||||
# - Include binary diff in patches instead of "binary files differ."
|
||||
|
|
|
|||
|
|
@ -378,7 +378,7 @@ default:
|
|||
php vendor/bin/phpstan analyze --configuration=./core/phpstan.neon.dist --no-progress || true
|
||||
# Generate a new baseline.
|
||||
echo "Generating an PHPStan baseline file (available as job artifact)."
|
||||
php vendor/bin/phpstan analyze --configuration=./core/phpstan.neon.dist --no-progress --generate-baseline=./core/phpstan-baseline.neon || true
|
||||
php vendor/bin/phpstan analyze --configuration=./core/phpstan.neon.dist --no-progress --generate-baseline=./core/.phpstan-baseline.php || true
|
||||
exit $EXIT_CODE
|
||||
fi
|
||||
|
||||
|
|
@ -389,7 +389,7 @@ default:
|
|||
# Only store the baseline if the job fails.
|
||||
when: on_failure
|
||||
paths:
|
||||
- core/phpstan-baseline.neon
|
||||
- core/.phpstan-baseline.php
|
||||
|
||||
'🧹 PHP Coding standards (PHPCS)':
|
||||
<<: [ *with-composer, *default-job-settings-lint ]
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -8,6 +8,8 @@
|
|||
<exclude-pattern>*/node_modules/*</exclude-pattern>
|
||||
<!--Exclude third party code.-->
|
||||
<exclude-pattern>./assets/vendor/*</exclude-pattern>
|
||||
<!--Exclude the PHPStan baseline from coding standards.-->
|
||||
<exclude-pattern>./core/.phpstan-baseline.php</exclude-pattern>
|
||||
<!-- Exclude third-party code maintained within core that does not follow our standards. -->
|
||||
<!-- @todo This rule may be removed when https://www.drupal.org/node/1848264 is resolved. -->
|
||||
<exclude-pattern>./core/lib/Drupal/Component/Diff/</exclude-pattern>
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,7 +1,7 @@
|
|||
# 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
|
||||
- .phpstan-baseline.php
|
||||
- phar://phpstan.phar/conf/bleedingEdge.neon
|
||||
|
||||
parameters:
|
||||
|
|
|
|||
|
|
@ -112,7 +112,7 @@ TOP_LEVEL=$($GIT rev-parse --show-toplevel)
|
|||
# This variable will be set to one when the file core/phpcs.xml.dist is changed.
|
||||
PHPCS_XML_DIST_FILE_CHANGED=0
|
||||
|
||||
# This variable will be set to one when the files core/phpstan-baseline.neon or
|
||||
# This variable will be set to one when the files core/.phpstan-baseline.php or
|
||||
# core/phpstan.neon.dist are changed.
|
||||
PHPSTAN_DIST_FILE_CHANGED=0
|
||||
|
||||
|
|
@ -153,7 +153,7 @@ for FILE in $FILES; do
|
|||
PHPCS_XML_DIST_FILE_CHANGED=1;
|
||||
fi;
|
||||
|
||||
if [[ $FILE == "core/phpstan-baseline.neon" || $FILE == "core/phpstan.neon.dist" ]]; then
|
||||
if [[ $FILE == "core/.phpstan-baseline.php" || $FILE == "core/phpstan.neon.dist" ]]; then
|
||||
PHPSTAN_DIST_FILE_CHANGED=1;
|
||||
fi;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue