[PATCH] Fix trailing whitespace in new (!!!) code

Jeremy Allison jra at samba.org
Fri Apr 6 19:37:43 UTC 2018

On Sat, Apr 07, 2018 at 07:30:40AM +1200, Andrew Bartlett via samba-technical wrote:
> On Fri, 2018-04-06 at 13:54 +0200, Ralph Böhme via samba-technical
> wrote:
> > On Fri, Apr 06, 2018 at 01:48:34PM +0200, Volker Lendecke via samba-technical wrote:
> > > Attached find a patch that cleans up fresh code to match
> > > README.Coding. Gary, if you review Andrew's code in the future, can
> > > you please point him at the relevant section of README.Coding, quoted
> > > here for your convenience?
> > 
> > I messed this up many times as well, the only thing that helped me to avoid
> > this error was to configure my editor to highlight trailing whitespace. :)
> I think it would be easier and far more productive to fix
> README.Coding.  This rule causes way to much trouble, it would be far
> more productive if the time spent enforcing it was spent on actual code
> review, as the rationale is, in my view, entirely weak.
> (Unlike the 80 column rule, which is to do with code nesting and
> complexity, trailing white-space has zero impact on the code when
> 'cleaned up'). 
> Finally, before someone suggests to 'just' have git clean it up, there
> are times (our XML docs, LDIF files) where it is significant, so it
> can't 'just' be stripped.
> We do need focus on code style and quality in reviews, but while Jeremy
> will again say something about M&Ms here, we have got to the point were
> everybody looks for the M&Ms and never the rest of the code. 
> Indeed Gary has got to the point where he jokes in the office that he
> should put in a long line in the hope of attracting some comment!
> Please review and push! 

The problem with changing the rule, is that for everyone who
has it already configured correctly in their editors, trailing
whitespace shows up as literal red-blobs in the code. This is
incredibly irritating and visually distracting :-).

Is there a reason you don't want to add the same editor macros
everyone else uses ?


More information about the samba-technical mailing list