public inbox for ltp@lists.linux.it
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Richard Palethorpe <rpalethorpe@suse.de>
Cc: ltp@lists.linux.it
Subject: Re: [LTP] [RFC] Using shellcheck for shell make check
Date: Tue, 30 Nov 2021 11:01:02 +0100	[thread overview]
Message-ID: <YaX2XgGp2U88Ck0h@pevik> (raw)
In-Reply-To: <87r1aykmfr.fsf@suse.de>

Hi Richie, Cyril,
> Hello,

> Cyril Hrubis <chrubis@suse.cz> writes:

> > Hi!
> >> checkbashisms does not detect all things: e.g. not catching {1..$FILE_COUNT}
> >> [1]. Maybe we should reconsider using *also* shellcheck as Joerg suggested
> >> (keep checkbashisms).

> >> I don't like shellcheck output, but it can detects errors checkbashisms cannot
> >> detect (checkbashisms is regexp based, but shellcheck IMHO evaluates the code).
> >> Also it's configurable, thus ve could disable check we don't like or enable only
> >> what we want to check. Or we can run just --severity=warning or
> >> --severity=error. If you're not against it, I can have look into this.

> > Sounds good, the more automated checks we have the less we will spend on
> > review...

> We can't vendor in a Haskell program, so it will have to be an optional
> check. Still it looks nice.
Yes, I didn't plan to vendor it. But fortunately it's being packaged some of
major distros [1] [2].

> Tree-sitter also supports "Bash", which might be useful for LTP specific
> checks. That ofcourse is much higher hanging fruit.
Interesting, it might be worth to investigate. But yes, the most important goal
is IMHO have valid portable POSIX syntax (to catch errors checkbashisms does not
detect).

I'd have to think about LTP specific checks (the only I would come up now is
LTP-003 - shell library API have TST_ prefix" but not sure how to test naming of
shell API as any shell global variables are local).

Kind regards,
Petr

[1] https://pkgs.org/download/ShellCheck
[2] https://pkgs.org/download/shellcheck


-- 
Mailing list info: https://lists.linux.it/listinfo/ltp

      reply	other threads:[~2021-11-30 10:01 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-29 11:05 [LTP] [RFC] Using shellcheck for shell make check Petr Vorel
2021-11-29 11:54 ` Cyril Hrubis
2021-11-30  9:29   ` Richard Palethorpe
2021-11-30 10:01     ` Petr Vorel [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=YaX2XgGp2U88Ck0h@pevik \
    --to=pvorel@suse.cz \
    --cc=ltp@lists.linux.it \
    --cc=rpalethorpe@suse.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox