lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] New shellcheck 0.9 warnings


From: Vadim Zeitlin
Subject: Re: [lmi] New shellcheck 0.9 warnings
Date: Wed, 11 Jan 2023 01:21:06 +0100

On Tue, 10 Jan 2023 22:16:18 +0000 Greg Chicares <gchicares@sbcglobal.net> 
wrote:

GC> On 1/5/23 01:41, Vadim Zeitlin wrote:
GC> [...]
GC> > CI builds got broken
GC> > because shellcheck version in Debian Sid has changed from 0.8 to 0.9 and
GC> > the new one gives many new warnings which can be seen in full at e.g.
GC> > 
GC> > 
https://github.com/let-me-illustrate/lmi/actions/runs/3838997409/jobs/6536168165
GC> 
GC> I'll soon push changes to both source files.

 Thanks, this worked, i.e. the CI builds now pass again.

GC> >  I can fix the warnings in install_xml_libraries.sh easily enough myself,
GC> > of course (the only surprising thing here is that these warnings were not
GC> > given by the previous shellcheck version),
GC> 
GC> I'll leave it to you to decide whether the other occurrences of
GC> /exit.*err/ in '.github/workflows/ci.yml' should be altered.
GC> (It looks much like a shell script, but I don't know enough to
GC> modify it confidently.)

 It's a YAML file which happens to contain shell script fragments, so it's
indeed a bit weird. It's not parsed by shellcheck, but I guess I should
still use the same style for these shell snippets as for the standalone
shell scripts, so I've just pushed a similar change for it, done by
manually piping all the script fragments to shellcheck from Vim using

:'<,'>w !sed 's/\${{[^}]\+}}/"$var"/g' | shellcheck -s bash -

as GitHub Actions expressions of the form ${{...}} confused shellcheck
otherwise and then fixing all the warnings.

 FWIW, in theory, ideal would be not to have any scripts in this file at
all and use scripts in separate .sh files that would be just invoked from
it, but I'm not sure if it's worth adding a bunch of tiny and mostly
trivial shell scripts, so I won't do it unless you think it is.

 Thanks again for fixing this!
VZ

Attachment: pgptcabLCKe8X.pgp
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]