[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] [PATCH] Fix shellcheck 0.7.2 errors in the CI builds
From: |
Greg Chicares |
Subject: |
Re: [lmi] [PATCH] Fix shellcheck 0.7.2 errors in the CI builds |
Date: |
Thu, 19 Aug 2021 11:13:09 +0000 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0 |
On 2021-08-19 02:01, Greg Chicares wrote:
> On 2021-08-17 13:17, Vadim Zeitlin wrote:
>
> [...] I tested all my committed but unpushed changes here:
> https://www.shellcheck.net/
> so that probably means they're right.
Pushed now.
>> 1. It now complains about the use of non-POSIX features such as process
>> substitution, brace expansion and arrays in POSIX sh scripts.
Formerly, SC2039 inhibited all such warnings. In shellcheck-0.7.2,
SC2039 has been "retired" and no longer inhibits them, so we need
to disable each one. But we still need to inhibit SC2039 for
shellcheck-0.7.0, which doesn't recognize the new SC3XXX codes.
> The solution I've been using is to pretend that zsh is sh, and
> disable each warning specifically. Now that dash is directly
> supported, I should pretend that zsh is dash instead.
Belay that. Pretending that zsh is dash just gives one omnibus
warning like SC2039 (with the up-to-the-minute shellcheck.net).
It is better to have the specific warnings that shellcheck gives
when we pretend that zsh is sh.