summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
10ba5f6)
For an unknown (to me) reason, the shellcheck binary from the Arch Linux
package (version 0.9.0-79) hits this error:
$ tools/shellcheck.sh
...
Running ShellCheck on `./tests/cli/test-intersection.sh`
shellcheck: (Array.!): undefined array element
...
This looks like an error internal to shellcheck. When using the Linux
x86-64 binary from the release [1], it works fine. Add a way to
override the shellcheck binary in shellcheck.sh, to make working around
this easier:
$ SHELLCHECK=/home/smarchi/Downloads/shellcheck-v0.9.0/shellcheck tools/shellcheck.sh
... all fine !
[1] https://github.com/koalaman/shellcheck/releases/tag/v0.9.0
Change-Id: I81f0ea2e40b9dbac75e0b0debcce63338986358c
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/11755
Tested-by: jenkins <jenkins@lttng.org>
Reviewed-by: Philippe Proulx <eeppeliteloop@gmail.com>
+shellcheck=${SHELLCHECK:-shellcheck}
retcode=0
while read -r script_file; do
echo "Running ShellCheck on \`$script_file\`"
pushd "${script_file%/*}" >/dev/null
retcode=0
while read -r script_file; do
echo "Running ShellCheck on \`$script_file\`"
pushd "${script_file%/*}" >/dev/null
- shellcheck -x "${script_file##*/}" || retcode=$?
+ "$shellcheck" -x "${script_file##*/}" || retcode=$?
popd >/dev/null
done <<< "$(find . -type f -name '*.sh' \
! -path './.git/*' \
popd >/dev/null
done <<< "$(find . -type f -name '*.sh' \
! -path './.git/*' \