We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents ea5acd5 + be7413b commit b0849e1Copy full SHA for b0849e1
2 files changed
hooks/command
@@ -37,4 +37,6 @@ fi
37
echo "+++ Running shellcheck on ${#files[@]} files"
38
if docker run --rm -v "$PWD:/mnt" koalaman/shellcheck "${files[@]}" ; then
39
echo "Files are ok ✅"
40
+else
41
+ exit 1
42
fi
tests/run.bats
@@ -33,3 +33,17 @@ load '/usr/local/lib/bats/load.bash'
33
34
unstub docker
35
}
36
+
+@test "Shellcheck failure" {
+ export BUILDKITE_PLUGIN_SHELLCHECK_FILES_0="tests/testdata/subdir/llamas.sh"
+ stub docker \
+ "run --rm -v $PWD:/mnt koalaman/shellcheck tests/testdata/test.sh tests/testdata/subdir/llamas.sh tests/testdata/subdir/shell\ with\ space.sh' : echo shellcheck failed; exit 1"
43
+ run "$PWD/hooks/command"
44
45
+ assert_failure
46
+ assert_output --partial "shellcheck failed"
47
48
+ unstub docker
49
+}
0 commit comments