shellcheck
Martin Schwenke
martin at meltin.net
Mon Aug 20 04:33:22 UTC 2018
On Mon, 29 Jan 2018 18:56:51 +1100, Andrew Bartlett
<abartlet at samba.org> wrote:
> On Mon, 2018-01-29 at 13:21 +1100, Martin Schwenke wrote:
> > On Mon, 29 Jan 2018 07:12:06 +1100, Andrew Bartlett via samba-technical
> > <samba-technical at lists.samba.org> wrote:
> >
> > > On Sun, 2018-01-28 at 18:55 +0100, Timur I. Bakeyev wrote:
> [...]
> > >
> > > This one Andreas raised just before the release because this overall
> > > test now fails for him on Fedora, but not Ubuntu.
> > >
> > > We either need to do that (use bash explicitly) or need to have a way
> > > to ensure these don't come back.
> > >
> > > One approach would be to put ShellCheck (with an ignore pattern or
> > > expected set of errors) into make test, alongside the python pep8
> > > checks.
> >
> > I think that this is generally a good idea. We did this to all the
> > non-test scripts in CTDB a while ago.
> >
> > However, it was a lot of work, so I'd like to preempt any idea that we
> > mandate the use of ShellCheck.
>
> OK.
>
> > It is a very blunt instrument that is
> > constantly changing.
>
> Ouch.
>
> > The maintainers sometimes add checks that are of
> > limited value. There was also a regression in version 0.4.5 (fixed in
> > 0.4.7) but this is not yet in Debian (which is still at 0.4.6), so I
> > see see one test failure when I run on my laptop.
> >
> > I think the approach should be to use ShellCheck on scripts that are
> > "known good" to ensure that we don't get any regressions. I would love
> > for CTDB's test scripts to pass ShellCheck but that would require more
> > time than I'm willing to spend on it right now.
>
> OK. I'm mainly interested in asserting that we don't go backwards, a
> bit like we do with the cc warnings -> errors setting.
Using ShellCheck in tests one step closer.
https://github.com/koalaman/shellcheck/pull/1316
The maintainer has just merged a -S/--severity option so that ShellCheck
can now ignore errors below a specified severity level. This means we
may be able to start with "-S warning" and perhaps progress up to
"-S info".
However, this option needs to be in a release first... :-)
... and people need time to get their code in shape... gee, even
"-S warning" produces a lot of warnings for the small number of CTDB
tests I've run it over...
peace & happiness,
martin
More information about the samba-technical
mailing list