bug-gnulib
[Top][All Lists]
Advanced

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

Re: [PATCH] maint: new syntax-check rule: prohibit empty lines at EOF


From: Pádraig Brady
Subject: Re: [PATCH] maint: new syntax-check rule: prohibit empty lines at EOF
Date: Sat, 10 Apr 2010 17:10:07 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 10/04/10 13:53, Jim Meyering wrote:
> Here's a rule I'm adding to coreutils' cfg.mk.
> However, I would like to use it several other projects,
> so rather than duplicating it in each, I'm thinking of
> putting it in gnulib's maint.mk.
> 
> Opinions?
> 
> I know that at least Bruno likes to retain trailing empty
> lines in modules/ files.  But for a class of files like that,
> it's easy to exempt "^modules/" or to omit the rule altogether.
> 
> Does anyone object to my adding this syntax check to maint.mk?
> 
> Aside from that, can anyone improve on the code?
> The multi-line Perl script is the only way I could get
> the efficiency I wanted, but there may well be another
> more concise way.

Maybe something like this?
tail -n1 files... | sed -n 's/==> \(.*\) <==/\1/; t blanks;d; :blanks h;n;/^ 
*$/{x;p};'
Though that won't work on solaris for example.

cheers,
Pádraig.




reply via email to

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