Re: List of packages shipping shell scripts with bashisms + MBF proposal
- To: lintian-maint@debian.org
- Cc: pkg-devscripts <pkg-devscripts@teams.debian.net>
- Subject: Re: List of packages shipping shell scripts with bashisms + MBF proposal
- From: "Adam D. Barratt" <adam@adam-barratt.org.uk>
- Date: Sat, 02 Feb 2008 00:16:24 +0000
- Message-id: <[🔎] 1201911384.31023.5.camel@kaa.jungle.aubergine.my-net-space.net>
- In-reply-to: <1201812401.8958.5.camel@kaa.jungle.aubergine.my-net-space.net>
- References: <fnolkp$a5u$1@ger.gmane.org> <e13a36b30801291817y4c7ceb63r638968f821c519a4@mail.gmail.com> <20080130023152.GX1240@evy.ikibiki.org> <e13a36b30801300143l7f25ec9do291865ba4b0c6856@mail.gmail.com> <fnq6d2$st8$1@ger.gmane.org> <873asfmak6.fsf@windlord.stanford.edu> <1201722774.19488.7.camel@kaa.jungle.aubergine.my-net-space.net> <87zlunjcnt.fsf@windlord.stanford.edu> <1201812401.8958.5.camel@kaa.jungle.aubergine.my-net-space.net>
On Thu, 2008-01-31 at 20:46 +0000, I wrote:
> On Wed, 2008-01-30 at 12:12 -0800, Russ Allbery wrote:
> > I'd definitely welcome any additional regexes or code to add to lintian.
> > (And at some point we can figure out how to keep this in sync with less
> > effort.)
>
> Having had chance to compare the two sets of regexes in more detail,
> there's (predictably enough) a lot of overlap. The differences are:
[...]
> Only in lintian:
>
> '(?:^|\s+)kill\s+-[^sl]\w*' - kill -[0-9] or -[A-Z]
> '(?:^|\s+)trap\s+["\']?.*["\']?\s+.*[1-9]' - trap with signal
> numbers
> '\[\[(?!:)' - alternative test command (i.e. [[ ]] rather than
> [ ])
These three have now been added to checkbashisms. I've also updated the
code to match the current version of checks/scripts more closely (c.f.
http://teams.debian.net/lurker/message/20080131.221011.7e176476.en.html).
Thanks to Russ for pointing out script_is_evil_and_wrong(), which
catches all the false positives I've tested it with so far (and is a
fantastic name for a function :-).
Adam
Reply to: