YETUS-68. Shellcheck plugin shows a warning against a removed file Signed-off-by: Allen Wittenauer <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/yetus/repo Commit: http://git-wip-us.apache.org/repos/asf/yetus/commit/c44fd145 Tree: http://git-wip-us.apache.org/repos/asf/yetus/tree/c44fd145 Diff: http://git-wip-us.apache.org/repos/asf/yetus/diff/c44fd145 Branch: refs/heads/master Commit: c44fd145c568808fe882ecb5fb189e1c5a475e98 Parents: 0cd3260 Author: Kengo Seki <[email protected]> Authored: Sun Oct 11 00:14:30 2015 +0900 Committer: Allen Wittenauer <[email protected]> Committed: Sat Oct 10 08:59:27 2015 -0700 ---------------------------------------------------------------------- dev-support/test-patch.d/shellcheck.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/yetus/blob/c44fd145/dev-support/test-patch.d/shellcheck.sh ---------------------------------------------------------------------- diff --git a/dev-support/test-patch.d/shellcheck.sh b/dev-support/test-patch.d/shellcheck.sh index 3cc7f6e..a3c08cf 100755 --- a/dev-support/test-patch.d/shellcheck.sh +++ b/dev-support/test-patch.d/shellcheck.sh @@ -122,7 +122,9 @@ function shellcheck_postapply echo "Running shellcheck against all identifiable shell scripts" # we re-check this in case one has been added for i in $(shellcheck_private_findbash); do - ${SHELLCHECK} -f gcc "${i}" >> "${PATCH_DIR}/patch-shellcheck-result.txt" + if [[ -f ${i} ]]; then + ${SHELLCHECK} -f gcc "${i}" >> "${PATCH_DIR}/patch-shellcheck-result.txt" + fi done if [[ ! -f "${PATCH_DIR}/branch-shellcheck-result.txt" ]]; then
