From e47291ec8cc89b0fd66de886475055accb9e9f8e Mon Sep 17 00:00:00 2001 From: Tuomo Tanskanen Date: Thu, 30 May 2024 15:30:31 +0300 Subject: [PATCH] shellcheck only files Make shellcheck consider only files. If branch name ended with .sh or .sh/something, it was found on the filesystem as something ending with .sh, and shellcheck picked it up, and linting failed obviously. Signed-off-by: Tuomo Tanskanen --- hack/shellcheck.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/hack/shellcheck.sh b/hack/shellcheck.sh index f5c256f1..751f7378 100755 --- a/hack/shellcheck.sh +++ b/hack/shellcheck.sh @@ -7,7 +7,7 @@ CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-podman}" if [ "${IS_CONTAINER}" != "false" ]; then TOP_DIR="${1:-.}" - find "${TOP_DIR}" -name '*.sh' -exec shellcheck -s bash {} \+ + find "${TOP_DIR}" -name '*.sh' -type f -exec shellcheck -s bash {} \+ else "${CONTAINER_RUNTIME}" run --rm \ --env IS_CONTAINER=TRUE \