Last modified: 2013-12-30 06:55:56 UTC
Created attachment 10945 [details] don't show trailing whitespace as a whitespace error Since we switched to Gerrit, people have started complaining that my code has trailing whitespace in it. Of course, my code has always had trailing whitespace in it, I've been using gvim as long as I've been contributing to MediaWiki and that's just what comes out of it. Since trailing whitespace is mostly harmless, here is an untested patch which should stop people complaining about it.
For the record, some people only *mention* the trailing whitespace rather than *complain* about it and said people (or person) only does so when there is a larger than usual amount of it.
Seeing the trailing whitespace is useful for when people really mess up. I can't see this getting accepted upstream, either. If someone is complaining over a stray space or something, ask them to stop.
Can't we just change the default preference?
The preference affects both leading and trailing whitespace though.
I'll note that the trailing whitespace thing isn't specific to Gerrit but to git in general: the default colors for git diff also highlight trailing whitespace in red. I believe one of the reasons why git is so afraid of trailing whitespace is because it can get corrupted when sending commits via e-mail (and then only if put directly in the body rather than in an attachment, and maybe even then only in some cases), but that's a Linux kernel-specific and IMO archaic workflow that we don't use. (E-mail clients eating trailing whitespace isn't that worrying by itself, but disappearing characters cause failing SHA-1 hash checks, and obviously git freaks out in that case.)
Splitting the preference is something that should be accepted upstream. Good note, Roan.