summaryrefslogtreecommitdiffstatshomepage
path: root/core/scripts/dev/commit-code-check.sh
diff options
context:
space:
mode:
authorbnjmnm <benm@umich.edu>2022-03-08 06:48:28 -0500
committerbnjmnm <benm@umich.edu>2022-03-08 06:48:28 -0500
commitb07c6d7c55934dd6ca8247d01850551225eef7cd (patch)
tree3eee3dbe1d28ddcdfe0a11c87450c9626a87846b /core/scripts/dev/commit-code-check.sh
parent8777a76a3f8bffc86f1f40b2abc95ed910881a62 (diff)
downloaddrupal-b07c6d7c55934dd6ca8247d01850551225eef7cd.tar.gz
drupal-b07c6d7c55934dd6ca8247d01850551225eef7cd.zip
Issue #3265652 by nod_, xjm, lauriii, Wim Leers, Gábor Hojtsy: Unfork jQuery UI
Diffstat (limited to 'core/scripts/dev/commit-code-check.sh')
-rwxr-xr-xcore/scripts/dev/commit-code-check.sh35
1 files changed, 1 insertions, 34 deletions
diff --git a/core/scripts/dev/commit-code-check.sh b/core/scripts/dev/commit-code-check.sh
index e829dd31529e..de9f08e0a1c5 100755
--- a/core/scripts/dev/commit-code-check.sh
+++ b/core/scripts/dev/commit-code-check.sh
@@ -353,7 +353,7 @@ for FILE in $FILES; do
############################################################################
### JAVASCRIPT FILES
############################################################################
- if [[ -f "$TOP_LEVEL/$FILE" ]] && [[ $FILE =~ \.js$ ]] && [[ ! $FILE =~ ^core/tests/Drupal/Nightwatch ]] && [[ ! $FILE =~ /tests/src/Nightwatch/ ]] && [[ ! $FILE =~ ^core/assets/vendor/jquery.ui/ui ]] && [[ ! $FILE =~ ^core/modules/ckeditor5/js/ckeditor5_plugins ]]; then
+ if [[ -f "$TOP_LEVEL/$FILE" ]] && [[ $FILE =~ \.js$ ]] && [[ ! $FILE =~ ^core/tests/Drupal/Nightwatch ]] && [[ ! $FILE =~ /tests/src/Nightwatch/ ]] && [[ ! $FILE =~ ^core/modules/ckeditor5/js/ckeditor5_plugins ]]; then
# Work out the root name of the JavaScript so we can ensure that the ES6
# version has been compiled correctly.
if [[ $FILE =~ \.es6\.js$ ]]; then
@@ -399,39 +399,6 @@ for FILE in $FILES; do
STATUS=1
fi
fi
- elif [[ -f "$TOP_LEVEL/$FILE" ]] && [[ $FILE =~ \.js$ ]] && [[ $FILE =~ ^core/assets/vendor/jquery.ui/ui ]]; then
- ## Check for minified file changes.
- if [[ $FILE =~ -min\.js$ ]]; then
- BASENAME=${FILE%-min.js}
- contains_element "$BASENAME.js" "${FILES[@]}"
- HASSRC=$?
- if [ "$HASSRC" -ne "0" ]; then
- COMPILE_CHECK=1
- else
- ## Source was also changed and will be checked.
- COMPILE_CHECK=0
- fi
- else
- ## Check for source changes.
- BASENAME=${FILE%.js}
- COMPILE_CHECK=1
- fi
- if [[ "$COMPILE_CHECK" == "1" ]] && [[ -f "$TOP_LEVEL/$BASENAME.js" ]]; then
- cd "$TOP_LEVEL/core"
- yarn run build:jqueryui --check --file "$TOP_LEVEL/$BASENAME.js"
- CORRECTJS=$?
- if [ "$CORRECTJS" -ne "0" ]; then
- # The yarn run command will write any error output.
- STATUS=1
- fi
- cd $TOP_LEVEL
- else
- # If there is no .js source file
- if ! [[ -f "$TOP_LEVEL/$BASENAME.js" ]]; then
- printf "${red}FAILURE${reset} $FILE does not have a corresponding $BASENAME.js\n"
- STATUS=1
- fi
- fi
else
# Check coding standards of Nightwatch files.
if [[ -f "$TOP_LEVEL/$FILE" ]] && [[ $FILE =~ \.js$ ]]; then