Skip to content

Commit

Permalink
Update shellcheck script to search all files with bash shebangs
Browse files Browse the repository at this point in the history
Several of the shell scripts in this repo do not have `.sh`
extensions, which means we will miss shellcheck-ing them with a
`find` that considers only the file name.

Signed-off-by: Stephen Augustus <[email protected]>
Co-Authored-By: Benjamin Elder <[email protected]>
  • Loading branch information
justaugustus and BenTheElder committed Jun 28, 2019
1 parent 8cffbbc commit a49f109
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions hack/verify-shellcheck.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,13 +36,8 @@ SHELLCHECK_IMAGE="koalaman/shellcheck-alpine:v0.6.0@sha256:7d4d712a2686da99d3758
all_shell_scripts=()
while IFS=$'\n' read -r script;
do git check-ignore -q "$script" || all_shell_scripts+=("$script");
done < <(find . -name "*.sh" \
-not \( \
-path ./_\* -o \
-path ./.git\* -o \
-path ./vendor\* -o \
\( -path ./third_party\* -a -not -path ./third_party/forked\* \) \
\))
done < <(grep -irl '#!.*sh' . \
--exclude-dir={/_\*,./.git\*,./vendor\*})

# common arguments we'll pass to shellcheck
SHELLCHECK_OPTIONS=(
Expand Down

0 comments on commit a49f109

Please sign in to comment.