Issue #3312089 by longwave: Run phpcs in parallel in commit-code-check.sh

merge-requests/3035/head
catch 2022-11-28 10:57:49 +00:00
parent b8a64b70a4
commit a531dfd3ac
2 changed files with 3 additions and 3 deletions

View File

@ -113,8 +113,8 @@
"Drupal\\Composer\\Composer::generateMetapackages", "Drupal\\Composer\\Composer::generateMetapackages",
"Drupal\\Composer\\Composer::generateComponentPackages" "Drupal\\Composer\\Composer::generateComponentPackages"
], ],
"phpcs": "phpcs --standard=core/phpcs.xml.dist --", "phpcs": "phpcs --standard=core/phpcs.xml.dist --parallel=$(nproc) --",
"phpcbf": "phpcbf --standard=core/phpcs.xml.dist --" "phpcbf": "phpcbf --standard=core/phpcs.xml.dist --parallel=$(nproc) --"
}, },
"repositories": [ "repositories": [
{ {

View File

@ -242,7 +242,7 @@ printf "\n"
# When the file core/phpcs.xml.dist has been changed, then PHPCS must check all files. # When the file core/phpcs.xml.dist has been changed, then PHPCS must check all files.
if [[ $PHPCS_XML_DIST_FILE_CHANGED == "1" ]]; then if [[ $PHPCS_XML_DIST_FILE_CHANGED == "1" ]]; then
# Test all files with phpcs rules. # Test all files with phpcs rules.
vendor/bin/phpcs -ps --standard="$TOP_LEVEL/core/phpcs.xml.dist" vendor/bin/phpcs -ps --parallel=$(nproc) --standard="$TOP_LEVEL/core/phpcs.xml.dist"
PHPCS=$? PHPCS=$?
if [ "$PHPCS" -ne "0" ]; then if [ "$PHPCS" -ne "0" ]; then
# If there are failures set the status to a number other than 0. # If there are failures set the status to a number other than 0.