develooper Front page | perl.perl5.porters | Postings from November 2016

Re: Tabs and spaces in patches

Thread Previous | Thread Next
From:
Eric Herman via perl5-porters
Date:
November 11, 2016 16:16
Subject:
Re: Tabs and spaces in patches
Message ID:
5825EEBC.4070909@booking.com

On 11-11-16 16:46, Andy Lester wrote:

> I’d also hope that a mass tabs-to-space conversion program would also
> trim off trailing whitespace from each line.

Can be done with sed, or perhaps it's a job for GNU Indent or similar? 
If so, it may be useful to supply the indent params. Some other projects 
do this:

* https://github.com/torvalds/linux/blob/master/scripts/Lindent

* https://github.com/dgryski/libchash/blob/master/Makefile#L75

> We also need to be aware of code in the tree that is autogenerated with
> tabs, like charclass_invlists.h.

However, for the perl codebase, an indent script should almost certainly 
not be mass-applied. Yet, if we could write one which describes the 
"preferred" style, this alone would be useful for guidance and could be 
referenced in the docs.

-- 
Eric Herman - mobile: +31 620719662
Booking.com - Principal Developer - Core infra: DB Scaling

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About