Bug#490227: Bug#490223: checkbashisms: 'function' checks is (again) not accurate
Hi,
On Thu, 2008-07-10 at 22:11 +0200, Luca Capello wrote:
> I was wondering why one of my scripts didn't work with /bin/sh -> dash,
> while checkbashisms didn't complain:
>
> =====
> luca@gismo:~$ volume-amixer.sh up
> /usr/local/bin/volume-amixer.sh: 27: function: not found
>
> /usr/local/bin/volume-amixer.sh: 32: Syntax error: "}" unexpected
[...]
> The problem is the same as bug #324599 [1], whose fix was reverted with
> r1434. Since that commit was done to get in sync with lintian, lintian
> is fault there too [3].
Thanks; I've updated the regex in both checkbashisms and lintian. I've
gone with a slight variant which should fix the false-negatives without
incurring many (if any) more false-positives:
qr'(?:^|\s+)function \w+(\s|\(|\Z)'
Regards,
Adam
Reply to: