From 920f7b673bbf701516ec7e158cd89d39201a23c9 Mon Sep 17 00:00:00 2001 From: Lucas Gravley <29484535+admiralAwkbar@users.noreply.github.com> Date: Fri, 28 Aug 2020 10:08:21 -0500 Subject: [PATCH] adding warning --- lib/worker.sh | 24 ++++++++++++++++-------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/lib/worker.sh b/lib/worker.sh index d21b5552..5e4acdb4 100755 --- a/lib/worker.sh +++ b/lib/worker.sh @@ -247,14 +247,22 @@ function LintCodebase() { # Check the shell for errors # ############################## if [ ${ERROR_CODE} -ne 0 ]; then - ######### - # Error # - ######### - error "Found errors in [${LINTER_NAME}] linter!" - error "[${LINT_CMD}]" - error "Linter CMD:[${LINTER_COMMAND} ${FILE}]" - # Increment the error count - (("ERRORS_FOUND_${FILE_TYPE}++")) + if [[ ${FILE_TYPE} == "BASH-EXEC" ]]; + ######## + # WARN # + ######## + warn "Warnings found in [${LINTER_NAME}] linter!" + warn "${LINT_CMD}" + else + ######### + # Error # + ######### + error "Found errors in [${LINTER_NAME}] linter!" + error "[${LINT_CMD}]" + error "Linter CMD:[${LINTER_COMMAND} ${FILE}]" + # Increment the error count + (("ERRORS_FOUND_${FILE_TYPE}++")) + fi ####################################################### # Store the linting as a temporary file in TAP format #