<div dir="ltr"><div class="gmail_quote"><div dir="ltr">On Mon, Sep 11, 2017 at 9:41 AM Julian Andres Klode <<a href="mailto:jak@jak-linux.org">jak@jak-linux.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On Mon, Sep 11, 2017 at 07:29:34AM +0000, Manuel Klimek wrote:<br>
> If you put a trailing comma on the line it does the right thing. Perhaps<br>
> you're on an old version?<br>
<br>
No, I just did not know :) Maybe it would be nice to have an option to<br>
do that automatically, but not sure. It does make sense.<br></blockquote><div><br></div><div>You mean forcing a comma at the end? Generally clang-format tries not to edit source code beyond whitespace. We've diverged from this in a couple of places, but always very carefully and reluctantly :) I personally don't think that option would carry the weight.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
><br>
> On Sun, Sep 10, 2017 at 8:25 PM Julian Andres Klode via cfe-dev <<br>
> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>
><br>
> > Hi,<br>
> ><br>
> > is there a way to configure clang-format to break line before the end of an<br>
> > initializer list?<br>
> ><br>
> > So, not do this:<br>
> ><br>
> >    static const char *WaitingTasks[][6] = {<br>
> >        {"systemd-networkd.service",<br>
> > "/lib/systemd/systemd-networkd-wait-online", "-q", "--timeout=30", nullptr},<br>
> >        {"NetworkManager.service", "nm-online", "-q", "--timeout", "30",<br>
> > nullptr}};<br>
> ><br>
> > but rather this:<br>
> ><br>
> >    static const char *WaitingTasks[][6] = {<br>
> >        {"systemd-networkd.service",<br>
> > "/lib/systemd/systemd-networkd-wait-online", "-q", "--timeout=30", nullptr},<br>
> >        {"NetworkManager.service", "nm-online", "-q", "--timeout", "30",<br>
> > nullptr}<br>
> >    };<br>
> ><br>
> > (possibly with a trailing comma on the nm-online line for consistency).<br>
> ><br>
> > This style looks much cleaner to me. Somewhat unrelated, it's also the<br>
> > style gofmt uses.<br>
> ><br>
> > (Please To/CC on replies, not subscribed)<br>
> > --<br>
> > Debian Developer - <a href="http://deb.li/jak" rel="noreferrer" target="_blank">deb.li/jak</a> | <a href="http://jak-linux.org" rel="noreferrer" target="_blank">jak-linux.org</a> - free software dev<br>
> >                   |  Ubuntu Core Developer |<br>
> > When replying, only quote what is necessary, and write each reply<br>
> > directly below the part(s) it pertains to ('inline').  Thank you.<br>
> > _______________________________________________<br>
> > cfe-dev mailing list<br>
> > <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
> ><br>
<br>
--<br>
Debian Developer - <a href="http://deb.li/jak" rel="noreferrer" target="_blank">deb.li/jak</a> | <a href="http://jak-linux.org" rel="noreferrer" target="_blank">jak-linux.org</a> - free software dev<br>
                  |  Ubuntu Core Developer |<br>
When replying, only quote what is necessary, and write each reply<br>
directly below the part(s) it pertains to ('inline').  Thank you.<br>
</blockquote></div></div>