diff --git a/ci/buildkite.yml b/ci/buildkite.yml index 540a6fe57..a1d8c755d 100644 --- a/ci/buildkite.yml +++ b/ci/buildkite.yml @@ -29,6 +29,8 @@ steps: user: "998:997" # buildkite-agent:buildkite-agent - command: "ci/test-cuda.sh" label: "cuda" + - command: "ci/shellcheck.sh" + label: "shellcheck [public]" - wait - command: "ci/publish.sh" label: "publish release artifacts" diff --git a/ci/shellcheck.sh b/ci/shellcheck.sh new file mode 100755 index 000000000..8a33cec9d --- /dev/null +++ b/ci/shellcheck.sh @@ -0,0 +1,14 @@ +#!/bin/bash -e +# +# Reference: https://github.com/koalaman/shellcheck/wiki/Directive + +cd "$(dirname "$0")/.." + +set -x +docker pull koalaman/shellcheck +find . -name "*.sh" -not -regex ".*/.cargo/.*" -print0 \ + | xargs -0 \ + docker run -w /work -v "$PWD:/work" \ + koalaman/shellcheck --color=always --external-sources --shell=bash + +exit 0