Lint shell scripts in CI
This commit is contained in:
parent
a3854c229e
commit
b7eec4c89f
|
@ -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"
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue