[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: gawk --lint option
From: |
arnold |
Subject: |
Re: gawk --lint option |
Date: |
Sat, 27 Jun 2020 23:51:18 -0600 |
User-agent: |
Heirloom mailx 12.5 7/5/10 |
Eric Pruitt <eric.pruitt@gmail.com> wrote:
> On Fri, Jun 26, 2020 at 09:51:45PM +0100, Denis M. Wilson wrote:
> > I would like to see a value which would allow extensions and only
> > complain about genuine errers.
>
> I wrote a few patches for GAWK to make the linter more (IMO) useful:
>
> - Change the handling of various implementation compatibility options.
> Most notably, the "--lint" option will no longer warns about non-POSIX
> features and GNU extensions unless POSIX or traditional mode has been
> explicitly enabled, and some non-standard features that were accepted
> when using one of those modes will now produce fatal errors. No
> changes to code only affecting "--lint-old" were made.
> - Remove the lint heuristics for "regular expression on right of
> assignment" and "assignment used in conditional context."
> - Remove the lint heuristics for "subscript of array ... is null
> string."
>
> I recently upgraded from 4.2 to 5.1, but when I ported the largest of
> the patches, I didn't do it correctly and haven't gotten around to
> fixing it. Once I do, I'll share the patches here.
You're welcome to do this of course. But I doubt that I will incorporate
these kinds of changes to behavior which is of such long standing.
Thanks,
Arnold