Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

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 5b23bcf commit 2ebf903
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}" \( -name '*.sh' -o -wholename 'scripts/*' \) -exec shellcheck -s bash {} \+
find "${TOP_DIR}" \( -name '*.sh' -o -wholename 'scripts/*' \) -type f -exec shellcheck -s bash {} \+
else
"${CONTAINER_RUNTIME}" run --rm \
--env IS_CONTAINER=TRUE \
Expand Down

0 comments on commit 2ebf903

Please sign in to comment.