From 50cf06f562d5f03f5940f911ebe10366feff9337 Mon Sep 17 00:00:00 2001 From: Gabo Date: Thu, 13 Aug 2020 07:58:06 -0500 Subject: [PATCH] Add sass and scss --- lib/buildFileList.sh | 11 +++++++---- lib/linter.sh | 2 +- lib/worker.sh | 2 +- 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/lib/buildFileList.sh b/lib/buildFileList.sh index 86a9522d..ce85dedd 100755 --- a/lib/buildFileList.sh +++ b/lib/buildFileList.sh @@ -200,7 +200,7 @@ function BuildFileList() { ###################### # Get the PERL files # ###################### - elif [ "${FILE_TYPE}" == "pl" ] || [ "${FILE_TYPE}" == "pm" ] || + elif [ "${FILE_TYPE}" == "pl" ] || [ "${FILE_TYPE}" == "pm" ] || [ "${FILE_TYPE}" == "t" ]; then ################################ # Append the file to the array # @@ -374,7 +374,8 @@ function BuildFileList() { # Append the file to the array # ################################ FILE_ARRAY_POWERSHELL+=("${FILE}") - elif [ "${FILE_TYPE}" == "css" ]; then + elif [ "${FILE_TYPE}" == "css" ] || [ "${FILE_TYPE}" == "scss" ] || + [ "${FILE_TYPE}" == "sass" ]; then ################################ # Append the file to the array # ################################ @@ -440,7 +441,8 @@ function BuildFileList() { # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## READ_ONLY_CHANGE_FLAG=1 - elif [ "${FILE_TYPE}" == "clj" ] || [ "${FILE_TYPE}" == "cljs" ] || [ "${FILE_TYPE}" == "cljc" ] || [ "${FILE_TYPE}" == "edn" ]; then + elif [ "${FILE_TYPE}" == "clj" ] || [ "${FILE_TYPE}" == "cljs" ] || + [ "${FILE_TYPE}" == "cljc" ] || [ "${FILE_TYPE}" == "edn" ]; then ################################ # Append the file to the array # ################################ @@ -467,7 +469,8 @@ function BuildFileList() { # Set the READ_ONLY_CHANGE_FLAG since this could be exec # ########################################################## READ_ONLY_CHANGE_FLAG=1 - elif [ "$FILE_TYPE" == "groovy" ] || [ "$FILE_TYPE" == "jenkinsfile" ] || [ "$FILE_TYPE" == "gradle" ]; then + elif [ "$FILE_TYPE" == "groovy" ] || [ "$FILE_TYPE" == "jenkinsfile" ] || + [ "$FILE_TYPE" == "gradle" ]; then ################################ # Append the file to the array # ################################ diff --git a/lib/linter.sh b/lib/linter.sh index 6afc27dc..f5e5024c 100755 --- a/lib/linter.sh +++ b/lib/linter.sh @@ -1364,7 +1364,7 @@ if [ "${VALIDATE_CSS}" == "true" ]; then ############################# # Lint the CSS files # ############################# - LintCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\)\$" "${FILE_ARRAY_CSS[@]}" + LintCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\|scss\|sass\)\$" "${FILE_ARRAY_CSS[@]}" fi ################ diff --git a/lib/worker.sh b/lib/worker.sh index a64a67cb..3f12ce1a 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -574,7 +574,7 @@ function RunTestCases() { TestCodebase "CLOUDFORMATION" "cfn-lint" "cfn-lint --config-file ${CLOUDFORMATION_LINTER_RULES}" ".*\.\(json\|yml\|yaml\)\$" "cloudformation" TestCodebase "CLOJURE" "clj-kondo" "clj-kondo --config ${CLOJURE_LINTER_RULES} --lint" ".*\.\(clj\|cljs\|cljc\|edn\)\$" "clojure" TestCodebase "COFFEESCRIPT" "coffeelint" "coffeelint -f ${COFFEESCRIPT_LINTER_RULES}" ".*\.\(coffee\)\$" "coffeescript" - TestCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\)\$" "css" + TestCodebase "CSS" "stylelint" "stylelint --config ${CSS_LINTER_RULES}" ".*\.\(css\|scss\|sass\)\$" "css" TestCodebase "DART" "dart" "dartanalyzer --fatal-infos --fatal-warnings --options ${DART_LINTER_RULES}" ".*\.\(dart\)\$" "dart" TestCodebase "DOCKERFILE" "dockerfilelint" "dockerfilelint -c ${DOCKERFILE_LINTER_RULES}" ".*\(Dockerfile\)\$" "docker" TestCodebase "DOCKERFILE_HADOLINT" "hadolint" "hadolint -c ${DOCKERFILE_HADOLINT_LINTER_RULES}" ".*\(Dockerfile\)\$" "docker"