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

Re: List of packages shipping shell scripts with bashisms + MBF proposal



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: