1 |
On 02/04/2018 07:22 PM, R0b0t1 wrote: |
2 |
> This is everything that shellcheck reported as an error. They are not |
3 |
> as serious as the globbing issue, but it would be a good idea to |
4 |
> change them. They are generally "type" issues (e.g. ">" instead of |
5 |
> "-gt"). |
6 |
> |
7 |
> Some changes are shellcheck annotations. Very interesting was: |
8 |
> |
9 |
> eval "$x=(\"\${$x[@]}\" ${QA_PREBUILT//\*/.*})" |
10 |
> |
11 |
> Which looks like a bad array expansion ("$x[@]"). |
12 |
|
13 |
I don't see a shellcheck error for that, using shellcheck-0.4.7. Maybe a |
14 |
false positive with an older version? |
15 |
|
16 |
> diff --git a/bin/isolated-functions.sh b/bin/isolated-functions.sh |
17 |
> index b28e44f18..377b32d90 100644 |
18 |
> --- a/bin/isolated-functions.sh |
19 |
> +++ b/bin/isolated-functions.sh |
20 |
> @@ -82,7 +82,7 @@ __dump_trace() { |
21 |
> lineno=${BASH_LINENO[${n} - 1]} |
22 |
> # Display function arguments |
23 |
> args= |
24 |
> - if [[ -n "${BASH_ARGV[@]}" ]]; then |
25 |
> + if [[ -n "${BASH_ARGV[*]}" ]]; then |
26 |
|
27 |
I feel like the shellcheck authors might be willing to accept [[ -n |
28 |
${BASH_ARGV[@]} ]] or [[ ${BASH_ARGV[@]} ]] as correct, since the |
29 |
"Problematic code" that they cite involves an incorrect comparison: |
30 |
|
31 |
https://github.com/koalaman/shellcheck/wiki/SC2199#problematic-code |
32 |
|
33 |
I've merged all of your other changes. Thanks! |
34 |
-- |
35 |
Thanks, |
36 |
Zac |