Skip to content

Commit

Permalink
shellcheck.sh
Browse files Browse the repository at this point in the history
  • Loading branch information
sambacha committed May 3, 2023
1 parent 564a4ab commit 2c510eb
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions shellcheck.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#!/usr/bin/env bash

set -e

targets=()
while IFS= read -r -d $'\0'; do
targets+=("$REPLY")
done < <(
find . -type f \( -name \*.bash -o -name \*.sh \) -print0; \
find . -type f -name '*.bats' -not -name '*_no_shellcheck*' -print0; \
find libfoundryup -type f -print0;
find bin -type f -print0)

if [[ $1 == --list ]]; then
printf "%s\n" "${targets[@]}"
exit 0
fi

LC_ALL=C.UTF-8 shellcheck "${targets[@]}"

exit $?

0 comments on commit 2c510eb

Please sign in to comment.