Loading core/scripts/dev/commit-code-check.sh +26 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,12 @@ # - core/.stylelintrc.json STYLELINT_CONFIG_FILE_CHANGED=0 # This variable will be set to one when JavaScript packages files are changed. # changed: # - core/package.json # - core/yarn.lock JAVASCRIPT_PACKAGES_CHANGED=0 # This variable will be set when a Drupal-specific CKEditor 5 plugin has changed # it is used to make sure the compiled JS is valid. CKEDITOR5_PLUGINS_CHANGED=0 Loading @@ -150,6 +156,7 @@ if [[ $FILE == "core/package.json" || $FILE == "core/yarn.lock" ]]; then ESLINT_CONFIG_PASSING_FILE_CHANGED=1; STYLELINT_CONFIG_FILE_CHANGED=1; JAVASCRIPT_PACKAGES_CHANGED=1; fi; if [[ -f "$TOP_LEVEL/$FILE" ]] && [[ $FILE =~ \.js$ ]] && [[ $FILE =~ ^core/modules/ckeditor5/js/build || $FILE =~ ^core/modules/ckeditor5/js/ckeditor5_plugins ]]; then Loading Loading @@ -283,6 +290,25 @@ printf "\n" fi # When JavaScript packages change, then rerun all JavaScript style checks. if [[ "$JAVASCRIPT_PACKAGES_CHANGED" == "1" ]]; then cd "$TOP_LEVEL/core" yarn run build:css --check CORRECTCSS=$? if [ "$CORRECTCSS" -ne "0" ]; then FINAL_STATUS=1 printf "\n${red}ERROR: The compiled CSS from the PCSS files" printf "\n does not match the current CSS files. Some added" printf "\n or updated JavaScript package made changes." printf "\n Recompile the CSS with: yarn run build:css${reset}\n\n" fi cd $TOP_LEVEL # Add a separator line to make the output easier to read. printf "\n" printf -- '-%.0s' {1..100} printf "\n" fi for FILE in $FILES; do STATUS=0; # Print a line to separate spellcheck output from per file output. Loading Loading
core/scripts/dev/commit-code-check.sh +26 −0 Original line number Diff line number Diff line Loading @@ -125,6 +125,12 @@ # - core/.stylelintrc.json STYLELINT_CONFIG_FILE_CHANGED=0 # This variable will be set to one when JavaScript packages files are changed. # changed: # - core/package.json # - core/yarn.lock JAVASCRIPT_PACKAGES_CHANGED=0 # This variable will be set when a Drupal-specific CKEditor 5 plugin has changed # it is used to make sure the compiled JS is valid. CKEDITOR5_PLUGINS_CHANGED=0 Loading @@ -150,6 +156,7 @@ if [[ $FILE == "core/package.json" || $FILE == "core/yarn.lock" ]]; then ESLINT_CONFIG_PASSING_FILE_CHANGED=1; STYLELINT_CONFIG_FILE_CHANGED=1; JAVASCRIPT_PACKAGES_CHANGED=1; fi; if [[ -f "$TOP_LEVEL/$FILE" ]] && [[ $FILE =~ \.js$ ]] && [[ $FILE =~ ^core/modules/ckeditor5/js/build || $FILE =~ ^core/modules/ckeditor5/js/ckeditor5_plugins ]]; then Loading Loading @@ -283,6 +290,25 @@ printf "\n" fi # When JavaScript packages change, then rerun all JavaScript style checks. if [[ "$JAVASCRIPT_PACKAGES_CHANGED" == "1" ]]; then cd "$TOP_LEVEL/core" yarn run build:css --check CORRECTCSS=$? if [ "$CORRECTCSS" -ne "0" ]; then FINAL_STATUS=1 printf "\n${red}ERROR: The compiled CSS from the PCSS files" printf "\n does not match the current CSS files. Some added" printf "\n or updated JavaScript package made changes." printf "\n Recompile the CSS with: yarn run build:css${reset}\n\n" fi cd $TOP_LEVEL # Add a separator line to make the output easier to read. printf "\n" printf -- '-%.0s' {1..100} printf "\n" fi for FILE in $FILES; do STATUS=0; # Print a line to separate spellcheck output from per file output. Loading