Skip to content

Commit

Permalink
Merge pull request #136 from staebler/ignore_vendor_in_shellcheck
Browse files Browse the repository at this point in the history
Ignore the vendor and .build directories when running shellcheck.
  • Loading branch information
openshift-merge-robot authored Aug 15, 2018
2 parents 873f609 + f6a54f3 commit b325680
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion hack/shellcheck.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
#!/bin/sh
if [ "$IS_CONTAINER" != "" ]; then
find "${1:-.}" -type f -name '*.sh' -exec shellcheck --format=gcc {} \+
TOP_DIR="${1:-.}"
find "${TOP_DIR}" \
-path "${TOP_DIR}/vendor" -prune \
-o -path "${TOP_DIR}/.build" -prune \
-o -type f -name '*.sh' -exec shellcheck --format=gcc {} \+
else
docker run -e IS_CONTAINER='TRUE' --rm -v "$(pwd)":/workdir:ro --entrypoint sh quay.io/coreos/shellcheck-alpine:v0.5.0 /workdir/hack/shellcheck.sh /workdir;
fi;

0 comments on commit b325680

Please sign in to comment.