bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] error: drop spurious semicolon


From: Jim Meyering
Subject: Re: [PATCH] error: drop spurious semicolon
Date: Thu, 4 Sep 2014 08:57:40 -0700

On Thu, Sep 4, 2014 at 8:11 AM, Ben Pfaff <address@hidden> wrote:
> On Thu, Sep 04, 2014 at 06:28:19AM -0600, Eric Blake wrote:
>> Noticed this while writing a syntax check rule to look for bogus
>> doubled semicolons.  If there's interest, I could add this rule
>> to maint.mk:
>>
>> # Except for shell files and for loops, double semicolon is probably a 
>> mistake
>> sc_prohibit_double_semicolon:
>>       @prohibit=';;'                                          \
>>       in_vc_files='\.[ch]$$'                                  \
>>       exclude='for \(.*\)'                                    \
>>       halt="Double semicolon detected"                        \
>>         $(_sc_search_regexp)
>
> That looks useful to me.

I like it, too.  But please relax it to also match
whitespace-separated semicolons.
Also, I'd anchor it at end of line, to avoid most false positives for the
legitimate use of two adjacent semicolons in a for-expression.



reply via email to

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