Skip to content

Commit

Permalink
Fix malformed JUNIT XML with shellcheck failures
Browse files Browse the repository at this point in the history
  • Loading branch information
cblecker committed Apr 21, 2019
1 parent b1fea1b commit 5236850
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions hack/verify-shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,13 @@ else
fi
fi

# if KUBE_JUNIT_REPORT_DIR is set, disable colorized output.
# Colorized output causes malformed XML in the JUNIT report.
SHELLCHECK_COLORIZED_OUTPUT="auto"
if [[ -n "${KUBE_JUNIT_REPORT_DIR:-}" ]]; then
SHELLCHECK_COLORIZED_OUTPUT="never"
fi

# common arguments we'll pass to shellcheck
SHELLCHECK_OPTIONS=(
# allow following sourced files that are not specified in the command,
Expand All @@ -131,6 +138,8 @@ SHELLCHECK_OPTIONS=(
"--external-sources"
# include our disabled lints
"--exclude=${SHELLCHECK_DISABLED}"
# set colorized output
"--color=${SHELLCHECK_COLORIZED_OUTPUT}"
)

# lint each script, tracking failures
Expand Down

0 comments on commit 5236850

Please sign in to comment.