File tree 2 files changed +7
-5
lines changed
2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 1
1
# Configuration file for PHPStan static code checking, see https://phpstan.org .
2
- # PHPStan is triggered on Drupal CI in commit-code-check.sh.
2
+ # PHPStan with partial analysis is triggered in commit-code-check.sh.
3
3
includes :
4
4
- phpstan.neon.dist
5
5
6
6
# Do not add additional configuration to this file. This configuration exists
7
7
# only to allow core/scripts/dev/commit-code-check.sh to run against a subset of
8
8
# the codebase.
9
9
parameters :
10
- reportUnmatchedIgnoredErrors : false
10
+ reportUnmatchedIgnoredErrors : false
Original file line number Diff line number Diff line change @@ -216,15 +216,17 @@ printf "\n"
216
216
printf -- ' -%.0s' {1..100}
217
217
printf " \n"
218
218
219
- # Run PHPStan on all files in one go for better performance. APCu is disabled to
220
- # ensure that the composer classmap is not corrupted.
221
- if [[ $PHPSTAN_DIST_FILE_CHANGED == " 1" ]]; then
219
+ # Run PHPStan on all files on DrupalCI or when phpstan files are changed.
220
+ # APCu is disabled to ensure that the composer classmap is not corrupted.
221
+ if [[ $PHPSTAN_DIST_FILE_CHANGED == " 1" ]] || [[ " $DRUPALCI " == " 1 " ]] ; then
222
222
printf " \nRunning PHPStan on *all* files.\n"
223
223
php -d apc.enabled=0 -d apc.enable_cli=0 vendor/bin/phpstan analyze --no-progress --configuration=" $TOP_LEVEL /core/phpstan.neon.dist"
224
224
else
225
+ # Only run PHPStan on changed files locally.
225
226
printf " \nRunning PHPStan on changed files.\n"
226
227
php -d apc.enabled=0 -d apc.enable_cli=0 vendor/bin/phpstan analyze --no-progress --configuration=" $TOP_LEVEL /core/phpstan-partial.neon" $ABS_FILES
227
228
fi
229
+
228
230
if [ " $? " -ne " 0" ]; then
229
231
# If there are failures set the status to a number other than 0.
230
232
FINAL_STATUS=1
You can’t perform that action at this time.
0 commit comments