Unverified Commit 3803c5a8 authored by larowlan's avatar larowlan
Browse files

Issue #3195888 by alexpott, quietone: Check dependencies are correct in...

Issue #3195888 by alexpott, quietone: Check dependencies are correct in core/scripts/dev/commit-code-check.sh

(cherry picked from commit 98a653c2)
parent 43eafc2a
......@@ -123,8 +123,31 @@
# run and all dependencies are updated.
FINAL_STATUS=0
# Check all files for spelling in one go for better performance.
DEPENDENCIES_NEED_INSTALLING=0
# Ensure PHP development dependencies are installed.
# @todo https://github.com/composer/composer/issues/4497 Improve this to
# determine if dependencies in the lock file match the installed versions.
# Using composer install --dry-run is not valid because it would depend on
# user-facing strings in Composer.
if ! [[ -f 'vendor/bin/phpcs' ]]; then
printf "Drupal's PHP development dependencies are not installed. Run 'composer install' from the root directory.\n"
DEPENDENCIES_NEED_INSTALLING=1;
fi
cd "$TOP_LEVEL/core"
# Ensure JavaScript development dependencies are installed.
yarn check -s 2>/dev/null
if [ "$?" -ne "0" ]; then
printf "Drupal's JavaScript development dependencies are not installed. Run 'yarn install' inside the core directory.\n"
DEPENDENCIES_NEED_INSTALLING=1;
fi
if [ $DEPENDENCIES_NEED_INSTALLING -ne 0 ]; then
exit 1;
fi
# Check all files for spelling in one go for better performance.
yarn run -s spellcheck -c $TOP_LEVEL/core/.cspell.json $ABS_FILES
if [ "$?" -ne "0" ]; then
# If there are failures set the status to a number other than 0.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment