[Development] White space / coding style patches welcome?

Oswald Buddenhagen oswald.buddenhagen at digia.com
Fri Mar 15 13:51:52 CET 2013


On Fri, Mar 15, 2013 at 12:49:55PM +0100, Axel Waggershauser wrote:
> On Fri, Mar 15, 2013 at 8:11 AM, Thiago Macieira <thiago.macieira at intel.com> wrote:
> >> 4) What about consistent placement of the ',' in class member
> >> initialization lists? I've seen
> >>
> >>     : GvbWidget(parent),
> >>
> >>       m_background()
> >>
> >> and
> >>
> >>     : GvbWidget(parent)
> >>
> >>     , m_background()
> >
> > I prefer the former, though I've seen people do the latter because it allows
> > for adding new members without touching a previous line.
> >
i'm undecided. i buy the "minimal diff" argument, but i also think it
looks stupid.

> > Both are acceptable.
> 
> I think so, too, but mixing them in one block is really plain 'horrid'
> :-). Seen at least once. I agree with you that the first one looks
> better. I guess even the proponents of the leading comma style would
> not like this:
> 
>    char * array[] = {
>       "some string"
>       , "some other string"
>    }
> 
uuuaaarrrgh!  ^^

> -> amend the official coding style wiki page?
> 
there are quite some rules missing from the wiki, so if you find
something, feel free to amend it. but make sure to keep the page
halfways structured and non-redundant - and that tends to be an art.

> So there is currently no hook mechanism in place that allowed for a
> strict enforcement? Maybe the current sanitize-commit mechanism is
> enough if people generally take the sanity bot warnings serious? Or
> maybe it could be changed to report a '-2' sanity review when really
> basic stuff (leading tabs, trailinng ws) is detected?
> 
the bot already does -2 for some very clear-cut or particulary egregious
failures. it's just a matter of extending the whitelists and adjusting
the arguments of the complain() calls.




More information about the Development mailing list