cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Joerg Heinicke <jheini...@virbus.de>
Subject Re: whitespace cleanup and efficiency drive
Date Wed, 12 Nov 2003 01:21:33 GMT
The result of this thread: let's care only about white spaces.

It's my opinion too. But the editor should do this automatically, not by 
running a task by hand. IDEA does it pretty good: Removes trailing 
spaces when saving a file, replaces existing tabs with spaces on save, 
when using the key TAB it adds spaces to the file. But unfortunately 
IDEA is not for free.

The editors I use at the moment are Eclipse and jEdit. Both can insert 
spaces instead of TAB when using the key. But both do not handle the 
other two things. And even worse for XML with Eclipse and SunBow: it 
does not even handle the TAB => spaces issue.

Even if this leads not to additional results my conclusion:
Having the right tools we would not have such problems.

Joerg

On 10.11.2003 05:52, David Crossley wrote:

> It might sound pedantic, but it is about efficiency.
> 
> I have wasted a lot of time during my committer life with
> confusing patches that contain mainly whitespace changes.
> Not to criticise the patcher or their tools, but today
> was a classic. With some manual tweaks to whitespace,
> i managed to bring one diff down from 450 lines to 120 lines.
> 
> What caused this grief? Well the files in cvs had inconsistent
> whitespace, most indentations were 4-space, some were 3-space,
> some line of text had two spaces between words rather than one,
> and other spurious issues. Now when the developer edited that
> file, their text editor must have tried to fix the whitespace,
> but in many cases made it worse.
> 
> Therefore the diff was full of clutter. If i had committed
> it then no-one would have been able to review the changes.
> It would look like almost every line had changed. Also the cvs
> files would have been in a worse state and then perpetuate it.
> 
> I suppose that it is a dream, but does anybody know about a
> tool that would automatically apply say 4-space indentation
> and whitespace clean up? We could apply that to our whole
> cvs say once per month.
> 
> --David


Mime
View raw message