From 64fefb9e1aad539484742a84122f55adce5ddba8 Mon Sep 17 00:00:00 2001 From: Eric Nemchik Date: Thu, 16 Feb 2023 09:39:29 -0600 Subject: [PATCH] Create empty results even when no files require checking --- checkrun.sh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/checkrun.sh b/checkrun.sh index 91de530..3795e1e 100755 --- a/checkrun.sh +++ b/checkrun.sh @@ -13,9 +13,7 @@ SHELLCKECK_IMAGE="koalaman/shellcheck:stable" TEST_AREA=() # clear preexising checkstyle files -if [[ -f "${WORKSPACE}"/shellcheck-result.xml ]]; then - rm "${WORKSPACE}"/shellcheck-result.xml -fi +echo "" >"${WORKSPACE}"/shellcheck-result.xml if [[ -d "${WORKSPACE}"/init ]]; then MOUNT_OPTIONS+=("-v" "${WORKSPACE}/init:/init") @@ -80,9 +78,5 @@ find "${ALL_SHELL_FILES[@]}" -exec \ "${SHELLCHECK_OPTIONS[@]}" {} + \ >"${WORKSPACE}"/shellcheck-result.xml -if [[ ! -f ${WORKSPACE}/shellcheck-result.xml ]]; then - echo "" >"${WORKSPACE}"/shellcheck-result.xml -fi - # exit gracefully exit 0