diff options
Diffstat (limited to 'core/scripts/dev/commit-code-check.sh')
-rwxr-xr-x | core/scripts/dev/commit-code-check.sh | 35 |
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 |