Skip to content

Commit

Permalink
shellcheck only files
Browse files Browse the repository at this point in the history
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 <[email protected]>
  • Loading branch information
tuminoid committed May 30, 2024
1 parent 22de857 commit bcb3e59
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion hack/shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ CONTAINER_RUNTIME="${CONTAINER_RUNTIME:-podman}"

if [ "${IS_CONTAINER}" != "false" ]; then
TOP_DIR="${1:-.}"
find "${TOP_DIR}" -path ./vendor -prune -o -name '*.sh' -exec shellcheck -s bash {} \+
find "${TOP_DIR}" -path ./vendor -prune -o -name '*.sh' -type f -exec shellcheck -s bash {} \+
else
"${CONTAINER_RUNTIME}" run --rm \
--env IS_CONTAINER=TRUE \
Expand Down

0 comments on commit bcb3e59

Please sign in to comment.