ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Magesh Umasankar" <umag...@rediffmail.com>
Subject [PROPOSAL] Chop task
Date Tue, 13 Nov 2001 22:25:31 GMT

Hi,
I propose to create a task somewhat along the lines of
perl's chop.  Given a file(set) and a character, if
a line in the file ends with the specified character,
that character will be chopped off from the line.
An option to recursively do it can also be specified.

A use case for this task is to remove whitespace chars
introduced at the end of a line and to also remove 
lines which contain nothing but spaces.  This would
make sense for a couple of reasons, at least:
1. occupies less storage.
2. behaves consistently across editors. For example, 
java source code lines ending with spaces are 'rtrim'med 
in Textpad, while vi wouldn't care.

The motivation behind this is that the Apache License has
a lot of trailing spaces and the cvs diffs that I make
always spit out these lines as diffs even though there's
been no real change.  If I do cvs diff -w, then I lose 
the whitespace changes that have relevance too :-(

Maybe we will never remove trailing whitespaces from all
of Apache's code for various reasons, but do you think 
such a task would at least be useful?  I would appreciate
any and all inputs that you provide.

Magesh

 


--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message