Return-Path: Delivered-To: apmail-jakarta-ant-dev-archive@apache.org Received: (qmail 13108 invoked from network); 15 Nov 2001 05:41:51 -0000 Received: from unknown (HELO nagoya.betaversion.org) (192.18.49.131) by daedalus.apache.org with SMTP; 15 Nov 2001 05:41:51 -0000 Received: (qmail 23829 invoked by uid 97); 15 Nov 2001 05:41:57 -0000 Delivered-To: qmlist-jakarta-archive-ant-dev@jakarta.apache.org Received: (qmail 23790 invoked by uid 97); 15 Nov 2001 05:41:56 -0000 Mailing-List: contact ant-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Ant Developers List" Reply-To: "Ant Developers List" Delivered-To: mailing list ant-dev@jakarta.apache.org Received: (qmail 23779 invoked from network); 15 Nov 2001 05:41:55 -0000 Message-ID: <3BF3076C.158DB933@progress.com> Date: Wed, 14 Nov 2001 19:08:12 -0500 From: "Bill Burton" Organization: Progress Software Corporation X-Mailer: Mozilla 4.76 [en] (Windows NT 5.0; U) X-Accept-Language: en-US MIME-Version: 1.0 To: Ant Developers List Subject: Re: [PROPOSAL] Chop task References: <20011113222531.1278.qmail@mailFA11.rediffmail.com> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hello, Rather than writing a new task, adding this functionality to the task may be appropriate. In addition to fixing newlines, the task can fix tabs. Trimming trailing whitespace is related to what the task already supports so it seems to me to be a logical extension of the existing functionality. If however, you want to trim arbitrary characters then it should probably be done as a new task. Although this could be done with the proposed task, it's not a "Pure Java" solution. -Bill Magesh Umasankar wrote: > > 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: For additional commands, e-mail: