[Development] White space / coding style patches welcome?

Oswald Buddenhagen oswald.buddenhagen at digia.com
Tue Mar 12 11:49:56 CET 2013

On Tue, Mar 12, 2013 at 04:35:59AM +0100, Axel Waggershauser wrote:
> So to fix whitespace (according to
> http://qt-project.org/wiki/Qt_Coding_Style) one has to come up with
> whitespace-only patches. I have a couple of questions regarding those:
> 1. Is something like the above patch welcome at all?
the recent consensus seems to be: yes.

> 2. Who would be interested/responsible for reviewing such boring patches?
me, when i'm bored.

> 3. How to best split up patches from that category? e.g. fixing all
> "if(...){" -> "if (...) {" occurrences in qtbase would be a rather
> large patch (I have it half done)
>   a) split that up based on "manageable" subdirectories?
yes, and that only for easy recovery from merge conflicts (which you
will get quite some of in highly active areas). other than that, make it
one huge whitespace cleanup change: remove trailing whitespace, expand
tabs (which for fun have inconsistent expectations regarding their
size), fix indentation, fix mixplaced line breaks (the brace re-wrapping
falls into this category), add missing spaces, etc.

somebody attempted this just a few days ago, but gave up when the scope
of the undertaking became clear. i can't find the change now ...

>   b) only do it in files where it is used inconsistently / where the
> wrong occurrences are the minority?
no, do it consistently - to have a good example everywhere, and no
excuses for messing up. then we can make the automatic checking
stricter, too (which lars said was a precondition for even bothering
with a cleanup to start with).

> 4. Given that such whitespace-only patches don't change the semantic
> of the code, is pushing to stable the correct approach? (I read that
> one is supposed to pick the 'most stable branch that is still
> applicable' because 'up-merging' is easy but backporting is evil.)
do it for dev. it's going to be merged into stable RSN anyway. if you
don't make the deadline, you can still re-target for stable (it would be
stupid not to do that, as then forward-merging would become hell).

have fun ^^

More information about the Development mailing list