From ded02bb9a0d686eb1113f7fba85727b3420d119d Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 11 May 2020 20:57:01 +1000 Subject: [PATCH 1/3] Fixed lint-theme not failing on failed linting. --- .docker/scripts/lint-theme | 1 + 1 file changed, 1 insertion(+) diff --git a/.docker/scripts/lint-theme b/.docker/scripts/lint-theme index 481fed80c..3cd1e02af 100644 --- a/.docker/scripts/lint-theme +++ b/.docker/scripts/lint-theme @@ -1,5 +1,6 @@ #!/usr/bin/env bash # Code linting for SaaS project. +set -e APP_DIR=${APP_DIR:-/app} PROFILE_DIR=${PROFILE_DIR:-${APP_DIR}/web} From 05114d41c22fa423b764b75b531619d9d1a89ca7 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 11 May 2020 20:57:43 +1000 Subject: [PATCH 2/3] Excluded node_modules from parallel-lint targets. --- .docker/scripts/lint-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.docker/scripts/lint-theme b/.docker/scripts/lint-theme index 3cd1e02af..2e8d2c679 100644 --- a/.docker/scripts/lint-theme +++ b/.docker/scripts/lint-theme @@ -6,7 +6,7 @@ APP_DIR=${APP_DIR:-/app} PROFILE_DIR=${PROFILE_DIR:-${APP_DIR}/web} # Lint code. -${APP_DIR}/tests/vendor/bin/parallel-lint --exclude /app/tests/vendor -e php,inc,module,theme,install,profile,test ${PROFILE_DIR}/themes/custom +${APP_DIR}/tests/vendor/bin/parallel-lint --exclude /app/tests/vendor --exclude ${PROFILE_DIR}/themes/custom/*/node_modules -e php,inc,module,theme,install,profile,test ${PROFILE_DIR}/themes/custom # Check code standards. ${APP_DIR}/tests/vendor/bin/phpcs --standard=${APP_DIR}/tests/phpcs.xml ${PROFILE_DIR}/themes/custom From 5ea5ac4c02699a6e618caa6eb3bd2db0550cfca2 Mon Sep 17 00:00:00 2001 From: Alex Skrypnyk Date: Mon, 11 May 2020 20:58:06 +1000 Subject: [PATCH 3/3] Excluded node_modules from phpcs targets. --- tests/phpcs.xml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/phpcs.xml b/tests/phpcs.xml index 9e926065b..49ad5d5ca 100755 --- a/tests/phpcs.xml +++ b/tests/phpcs.xml @@ -1,6 +1,6 @@ - - PHPCS Standard for a GoVCMS8 website, based on Drupal standards. + + PHPCS Standard for a GovCMS8 website, based on Drupal standards. @@ -24,6 +24,9 @@ *library*\.js *libraries*\.js + + web/themes/custom/*/node_modules/* + *\.bean\.* *\.context\.*