William Bader <[email protected]> writes:
> Could fixing shellcheck errors or warnings break intentional unusual
> syntax for work-arounds for errors in shells with posix
> incompatibilities like the shell in Solaris?
Maybe.
I think it would be nice to use shellcheck, but agree with Pádraig that
they are mostly (all?) false positives. It is difficult to see anything
other than warnings like this:
$ shellcheck tests/*/*.sh
[...]
In tests/basenc/large-input.sh line 27:
Exit $fail
^---^ SC2086 (info): Double quote to prevent globbing and word
splitting.
[...]
In our tests $fail will be unset or "1". Quoting it would actually cause
issues:
$ bash -c 'fail=1; exit "$fail"'
$ echo $?
1
$ bash -c 'exit "$fail"'
bash: line 1: exit: : numeric argument required
$ echo $?
2
Collin