#!/usr/bin/env bash set -euo pipefail . {{shell2junit_path}} # Execute shellcheck using juLog so we produce an XML JUnit report. juLog \ -output="$TEST_TMPDIR" \ -class="$(basename {{file}})" \ -name="shellcheck" \ {{shellcheck_path}} --external-sources "{{file}}" # Move output to location where Bazel will collect it. Can't write directly # to XML_OUTPUT_FILE because juLog assumes directory. mv "$TEST_TMPDIR/junit_$(basename {{file}}).xml" "$XML_OUTPUT_FILE"