[dpdk-dev] [PATCH] fix trailing whitespace.

Richardson, Bruce bruce.richardson at intel.com
Wed Jun 11 17:24:04 CEST 2014


> -----Original Message-----
> From: Thomas Monjalon [mailto:thomas.monjalon at 6wind.com]
> Sent: Wednesday, June 11, 2014 3:04 AM
> To: Richardson, Bruce
> Cc: dev at dpdk.org; Neil Horman
> Subject: Re: [dpdk-dev] [PATCH] fix trailing whitespace.
> 
> > > This commit removes trailing whitespace from lines in files. Almost all
> > > files are affected, as the BSD license copyright header had trailing
> > > whitespace on 4 lines in it [hence the number of files reporting 8 lines
> > > changed in the diffstat].
> > >
> > > Signed-off-by: Bruce Richardson <bruce.richardson at intel.com>
> > Acked-by: Neil Horman <nhorman at tuxdriver.com>
> 
> I've completed it with these changes:
> 	- remove spaces before tabs in libs
> 	- remove more trailing spaces in non-C files
> 
> Applied for version 1.7.0.
> 
> Some whitespaces and indentation errors are remaining, especially in examples.
> But it can be fixed when examples will be updated.
> I'm not a big fan of such patch. I prefer to take care of not adding new
> spacing errors. So from now, trailing whitespaces, spaces before tabs
> and wrong indentation should be tracked carefully in new patches.
> 
Just FYI: my reasoning for cleaning it up now is that it allows us to write rules for our editors or IDEs to automatically fix whitespace errors on save (the patch I generated was created by using a vim rule on file save). Without having things cleaned up ahead of time, having a vim rule such as this will cleanup each file as it is modified, leading to lots of extra whitespace changes in our diffs, which are irrelevant to the code being changed. This then makes our lives harder when working on patches.

/Bruce


More information about the dev mailing list