Huge patch on trunk: whitespace removal

Hi,

We were noticing lately that some editors (like Eclipse) remove trailing
whitespace when a file is saved. This causes unnecessary hunks in patches.
We're preparing trunk/rtt and ocl to remove these in one commit.

The command used is:

for i in $(find . -name '*hpp' -o -name '*cpp' | grep -v '.svn'); do
sed -i -r 's/[ \t]*$//' $i; done

In case you want to preview what will be done, you can use (note: echo):

for i in $(find . -name '*hpp' -o -name '*cpp' | grep -v '.svn'); do echo
sed -i -r 's/[ \t]*$//' $i; done

I believe KDL & BFL will need such a change as well. Normally, it should be
the job of the svn system to check for these whitespaces (and all indentation
for that matter) and remove them when comitted. But for now, this is a manual
process.

I have also changed the 'header_gen' scripts (see trunk/rtt/tools/scripts/)
such that they do no longer add whitespace at the end of some lines.

Peter

Huge patch on trunk: whitespace removal

On Wednesday 13 August 2008 10:43:25 Peter Soetens wrote:
> Hi,
>
> We were noticing lately that some editors (like Eclipse) remove trailing
> whitespace when a file is saved. This causes unnecessary hunks in patches.
> We're preparing trunk/rtt & ocl to remove these in one commit.
>
> The command used is:
>
> for i in $(find . -name '*hpp' -o -name '*cpp' | grep -v '.svn'); do
> sed -i -r 's/[ \t]*$//' $i; done
>
> In case you want to preview what will be done, you can use (note: echo):
>
> for i in $(find . -name '*hpp' -o -name '*cpp' | grep -v '.svn'); do echo
> sed -i -r 's/[ \t]*$//' $i; done
>
> I believe KDL & BFL will need such a change as well. Normally, it should be
> the job of the svn system to check for these whitespaces (and all
> indentation for that matter) and remove them when comitted. But for now,
> this is a manual process.

BFL adapted according to Peter's suggestion in r29495.

Tinne
_______________________________________________
I hereby promise not to top-post on the
BFL mailing list
BFL [..] ...
http://lists.mech.kuleuven.be/mailman/listinfo/bfl

Disclaimer: http://www.kuleuven.be/cwis/email_disclaimer.htm

Huge patch on trunk: whitespace removal

Tinne De Laet wrote:
On Wednesday 13 August 2008 10:43:25 Peter Soetens wrote:
[...]
> The command used is:
>
> for i in $(find . -name '*hpp' -o -name '*cpp' | grep -v '.svn'); do
> sed -i -r 's/[ \t]*$//' $i; done
>
> In case you want to preview what will be done, you can use (note: echo):
>
> for i in $(find . -name '*hpp' -o -name '*cpp' | grep -v '.svn'); do echo
> sed -i -r 's/[ \t]*$//' $i; done
>
> I believe KDL & BFL will need such a change as well.

BFL adapted according to Peter's suggestion in r29495.

Unfortunately BFL uses header files ending in .h. I only noticed this while ending up with unreadable patches in bug #608 :-(
Committed revision 29830.

Huge patch on trunk: whitespace removal

On Wednesday 13 August 2008 10:43:25 Peter Soetens wrote:
> Hi,
>
> We were noticing lately that some editors (like Eclipse) remove trailing
> whitespace when a file is saved. This causes unnecessary hunks in patches.
> We're preparing trunk/rtt & ocl to remove these in one commit.

trunk/rtt and trunk/ocl have been updated in r29491 and r29492.

I expect KDL and BFL to follow :-)

Peter

Ruben Smits's picture

Huge patch on trunk: whitespace removal

On Wednesday 13 August 2008 13:52:07 Peter Soetens wrote:
> On Wednesday 13 August 2008 10:43:25 Peter Soetens wrote:
> > Hi,
> >
> > We were noticing lately that some editors (like Eclipse) remove trailing
> > whitespace when a file is saved. This causes unnecessary hunks in
> > patches. We're preparing trunk/rtt & ocl to remove these in one commit.
>
> trunk/rtt and trunk/ocl have been updated in r29491 and r29492.
>
> I expect KDL and BFL to follow :-)

svn ci -m"removing trailing whitespaces"
[...]
Committed revision 29511.

KDL -> done ;)

Ruben