bug-gawk
[Top][All Lists]
Advanced

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

Re: lint warning: unnecessary mixing of `>' and `>>'


From: Hermann Peifer
Subject: Re: lint warning: unnecessary mixing of `>' and `>>'
Date: Fri, 20 Oct 2023 16:45:41 +0200
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:102.0) Gecko/20100101 Thunderbird/102.15.1

On 20/10/2023 15.18, Andrew J. Schorr wrote:
Ha. Fair point. Both approaches give the same result, but I suppose you are
correct that the --lint behavior seems to be inconsistent with the manual's
suggestion. The current code in io.c:check_duplicated_redirections does not
seem to distinguish between which was used first ('>' or '>>'), but I think it
could be enhanced to do so. Of the 11 things it checks for, this is probably
the only one where the ordering matters. Maybe it should be handled as
a special case...


The code in io.c could perhaps be enhanced, but I would also understand
if lint warning fixing does not have the highest priority in gawk
maintenance work.

It just happened that I recently aliased awk to 'awk --lint' on my
Macbook after which I came across many warnings I have never seen
before. Almost all lint warnings are very helpful for me, only a few
ones are puzzling.

Hermann



reply via email to

[Prev in Thread] Current Thread [Next in Thread]