cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Collen <>
Subject Re: whitespace cleanup and efficiency drive
Date Mon, 10 Nov 2003 05:16:44 GMT
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.

Perhaps we need a Guide to Not Letting Your Editor Mess Up The Code(tm). 
  I know things like Textpad can really goof up source automatically. 
*guilty nervous cough*

> 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 had this problem briefly where my editor was removing extra whitespace 
from the end of lines automatically on save, and then the diffs were 
showing up with changed lines where it wasn't apparent there was a 
change at all.
> 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.


Never used it, just Google'd it.

I'm +1 for making our source easier to read.  Maybe we should also 
instate a policy that incoming patches from non-committers should either 
be submitted properly formatted, or we won't take it.

> --David



View raw message