trailing whitespace

1 view
Skip to first unread message

Andrew McNabb

unread,
Apr 15, 2009, 2:02:23 PM4/15/09
to co...@googlegroups.com
I've had some minor problems with code folding in my editor because
there are a lot of lines that have trailing spaces. I'm guessing that
the trailing spaces are created by a bug in a text editor. I have
posted a patch at http://aml.cs.byu.edu/~amcnabb/trailing-spaces.patch
which removes all trailing spaces.

I'm really not trying to be unreasonably picky (or else I would start a
crusade against DOS line endings :). Anyway, I know that this sort of
change can disrupt version control tools, but most of them have a way to
ignore whitespace (e.g., svn diff -x -w). On the bright side, it
decreases the size of the source code by more than 6 kilobytes. :)

Would you consider applying this patch?


--
Andrew McNabb
http://www.mcnabbs.org/andrew/
PGP Fingerprint: 8A17 B57C 6879 1863 DE55 8012 AB4D 6098 8826 6868

Ionel Maries Cristian

unread,
Apr 16, 2009, 2:54:29 PM4/16/09
to co...@googlegroups.com
I would apply it if I decide there are not going the be any serious
changes to cogen in this summer (because it would derange
the process of doing it - imagine we could have a branch).

I would incrementally do it. I'm starting to accommodate in a better
editor that can automatically clean whitespace trails these days.

About the line endings - I want to keep the DOS endings (basically
on the same reasons) - and I don't think it's a big deal since tools
can work with the differences no ?

So basically I can't give you a straight answer right now :(

-- ionel

Andrew McNabb

unread,
Apr 16, 2009, 3:27:57 PM4/16/09
to co...@googlegroups.com
On Thu, Apr 16, 2009 at 09:54:29PM +0300, Ionel Maries Cristian wrote:
> I would apply it if I decide there are not going the be any serious
> changes to cogen in this summer (because it would derange
> the process of doing it - imagine we could have a branch).
>
> I would incrementally do it. I'm starting to accommodate in a better
> editor that can automatically clean whitespace trails these days.

Hmm, I'm not quite sure I understand the argument for doing it
incrementally. It seems that making changes over the summer would
actually be an argument for doing it once and having it done. If
whitespace is fixed incrementally, then it would be very difficult to
make and apply patches in the meantime.


> About the line endings - I want to keep the DOS endings (basically
> on the same reasons) - and I don't think it's a big deal since tools
> can work with the differences no ?

I really don't mind the DOS endings, as long as it's consistent.
Unfortunately, there are a number of files that mostly use DOS endings
but have a few lines with Unix line endings. Unfortunately, these get
opened up in Unix mode by default (at least in Vim).


> So basically I can't give you a straight answer right now :(

Could you at least make all of the files use DOS endings consistently?
Editing mixed-format files could seriously make me go crazy. :(

Thanks.

Reply all
Reply to author
Forward
0 new messages