From c9471d70eb49b11108a41284ddce014a6b575700 Mon Sep 17 00:00:00 2001 From: Ishan Goel Date: Wed, 20 Jan 2021 22:44:30 +0400 Subject: [PATCH] Linter command output on newline (#1146) When lint fails, print command output on a newline surrounded by "------" Co-authored-by: Lukas Gravley Co-authored-by: Gabriel Diaz --- lib/functions/worker.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/functions/worker.sh b/lib/functions/worker.sh index 156954ac..24285bc2 100755 --- a/lib/functions/worker.sh +++ b/lib/functions/worker.sh @@ -283,7 +283,7 @@ function LintCodebase() { # Error # ######### error "Found errors in [${LINTER_NAME}] linter!" - error "Error code: ${ERROR_CODE}. Command output:${NC}[${LINT_CMD}]" + error "Error code: ${ERROR_CODE}. Command output:${NC}\n------\n${LINT_CMD}\n------" # Increment the error count (("ERRORS_FOUND_${FILE_TYPE}++")) fi @@ -321,7 +321,7 @@ function LintCodebase() { ######### error "Found errors in [${LINTER_NAME}] linter!" error "This file should have failed test case!" - error "Error code: ${ERROR_CODE}. Command output:${NC}[${LINT_CMD}]." + error "Error code: ${ERROR_CODE}. Command output:${NC}\n------\n${LINT_CMD}\n------" # Increment the error count (("ERRORS_FOUND_${FILE_TYPE}++")) else @@ -339,7 +339,7 @@ function LintCodebase() { AddDetailedMessageIfEnabled "${LINT_CMD}" "${TMPFILE}" fi fi - debug "Error code: ${ERROR_CODE}. Command output:${NC}[${LINT_CMD}]." + debug "Error code: ${ERROR_CODE}. Command output:${NC}\n------\n${LINT_CMD}\n------" done #################################