File tree Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Expand file tree Collapse file tree 1 file changed +9
-0
lines changed Original file line number Diff line number Diff line change @@ -123,6 +123,13 @@ else
123
123
fi
124
124
fi
125
125
126
+ # if KUBE_JUNIT_REPORT_DIR is set, disable colorized output.
127
+ # Colorized output causes malformed XML in the JUNIT report.
128
+ SHELLCHECK_COLORIZED_OUTPUT=" auto"
129
+ if [[ -n " ${KUBE_JUNIT_REPORT_DIR:- } " ]]; then
130
+ SHELLCHECK_COLORIZED_OUTPUT=" never"
131
+ fi
132
+
126
133
# common arguments we'll pass to shellcheck
127
134
SHELLCHECK_OPTIONS=(
128
135
# allow following sourced files that are not specified in the command,
@@ -131,6 +138,8 @@ SHELLCHECK_OPTIONS=(
131
138
" --external-sources"
132
139
# include our disabled lints
133
140
" --exclude=${SHELLCHECK_DISABLED} "
141
+ # set colorized output
142
+ " --color=${SHELLCHECK_COLORIZED_OUTPUT} "
134
143
)
135
144
136
145
# lint each script, tracking failures
You can’t perform that action at this time.
0 commit comments