Skip to content

Commit b6d8e50

Browse files
committed
Fix line indentation and improve tests for phpcs
Fixed test reporting false positives on mac/zsh (while failing in GitHub Actions).
1 parent 0357d11 commit b6d8e50

File tree

5 files changed

+32
-32
lines changed

5 files changed

+32
-32
lines changed

8.2/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,13 @@ RUN set -e; \
238238
# Set allow-plugins. See https://getcomposer.org/allow-plugins
239239
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true; \
240240
composer global require drupal/coder wp-coding-standards/wpcs phpcompatibility/phpcompatibility-wp; \
241-
# Don't fix the indentation or installed_paths will not be set correctly
241+
# IMPORTANT: Do NOT fix the indentation or installed_paths will not be set correctly
242242
phpcs --config-set installed_paths \
243-
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
244-
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
245-
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
246-
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
247-
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
243+
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
244+
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
245+
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
246+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
247+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
248248
# Cleanup
249249
composer clear-cache
250250

8.3/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,13 @@ RUN set -e; \
238238
# Set allow-plugins. See https://getcomposer.org/allow-plugins
239239
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true; \
240240
composer global require drupal/coder wp-coding-standards/wpcs phpcompatibility/phpcompatibility-wp; \
241-
# Don't fix the indentation or installed_paths will not be set correctly
241+
# IMPORTANT: Do NOT fix the indentation or installed_paths will not be set correctly
242242
phpcs --config-set installed_paths \
243-
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
244-
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
245-
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
246-
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
247-
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
243+
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
244+
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
245+
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
246+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
247+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
248248
# Cleanup
249249
composer clear-cache
250250

8.4/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,13 @@ RUN set -e; \
238238
# Set allow-plugins. See https://getcomposer.org/allow-plugins
239239
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true; \
240240
composer global require drupal/coder wp-coding-standards/wpcs phpcompatibility/phpcompatibility-wp; \
241-
# Don't fix the indentation or installed_paths will not be set correctly
241+
# IMPORTANT: Do NOT fix the indentation or installed_paths will not be set correctly
242242
phpcs --config-set installed_paths \
243-
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
244-
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
245-
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
246-
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
247-
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
243+
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
244+
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
245+
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
246+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
247+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
248248
# Cleanup
249249
composer clear-cache
250250

8.5/Dockerfile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ RUN set -e; \
241241
# Set allow-plugins. See https://getcomposer.org/allow-plugins
242242
composer global config allow-plugins.dealerdirect/phpcodesniffer-composer-installer true; \
243243
composer global require drupal/coder wp-coding-standards/wpcs phpcompatibility/phpcompatibility-wp; \
244-
# Don't fix the indentation or installed_paths will not be set correctly
244+
# IMPORTANT: Do NOT fix the indentation or installed_paths will not be set correctly
245245
phpcs --config-set installed_paths \
246-
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
247-
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
248-
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
249-
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
250-
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
246+
$HOME/.config/composer/vendor/drupal/coder/coder_sniffer/,\
247+
$HOME/.config/composer/vendor/wp-coding-standards/wpcs/,\
248+
$HOME/.config/composer/vendor/phpcompatibility/php-compatibility/PHPCompatibility/,\
249+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-wp/PHPCompatibilityWP,\
250+
$HOME/.config/composer/vendor/phpcompatibility/phpcompatibility-paragonie/PHPCompatibilityParagonieRandomCompat; \
251251
# Cleanup
252252
composer clear-cache
253253

tests/test.bats

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -163,12 +163,12 @@ _healthcheck_wait ()
163163

164164
# Check xdebug was enabled
165165
run make exec -e CMD='php -m'
166-
echo "$output" | grep -e "^xdebug$"
166+
echo "$output" | grep -E "^xdebug$"
167167
unset output
168168

169169
# Check xdebug was enabled
170170
run make exec -e CMD='php -m'
171-
echo "$output" | grep -e "^xhprof$"
171+
echo "$output" | grep -E "^xhprof$"
172172
unset output
173173

174174
# Check PHP CLI overrides
@@ -488,12 +488,12 @@ _healthcheck_wait ()
488488
run docker exec -u docker "$NAME" bash -lc "phpcs -i | sed 's/,//g'"
489489
# The trailing space below allows comparing all values the same way: " <value> " (needed for the last value to match).
490490
output="${output} "
491-
[[ "${output}" =~ " Drupal " ]]
492-
[[ "${output}" =~ " DrupalPractice " ]]
493-
[[ "${output}" =~ " WordPress " ]] # Includes WordPress-Core, WordPress-Docs and WordPress-Extra
494-
[[ "${output}" =~ " PHPCompatibility " ]]
495-
[[ "${output}" =~ " PHPCompatibilityWP " ]]
496-
[[ "${output}" =~ " PHPCompatibilityParagonieRandomCompat " ]]
491+
echo "$output" | grep " Drupal "
492+
echo "$output" | grep " DrupalPractice "
493+
echo "$output" | grep " WordPress " # Includes WordPress-Core, WordPress-Docs and WordPress-Extra
494+
echo "$output" | grep " PHPCompatibility "
495+
echo "$output" | grep " PHPCompatibilityWP "
496+
echo "$output" | grep " PHPCompatibilityParagonieRandomCompat "
497497
unset output
498498

499499
### Cleanup ###

0 commit comments

Comments
 (0)