<p dir="ltr">No, there is no such option. For webkit style we don't really need it as we can either link it to the comma placement or just keep the authors line break (as webkit doesn't have a columnlimit). </p>
<div class="gmail_quote">On Aug 30, 2015 12:38 PM, "Florian Lindner" <<a href="mailto:mailinglists@xgm.de">mailinglists@xgm.de</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Ok, I understand your reason, though I do not agree ;-)<br>
<br>
Another question on clang-format regarding initializer lists:<br>
<br>
I want my list to have one initializer per line, with the break after the comma.<br>
<br>
ConstructorInitializerAllOnOneLineOrOnePerLine: true does this, but only if the unbroken list is longer than ColumnLimit<br>
<br>
Is there a way to always break the initializer list after each entry? I understand the WebKit style guide to demand that:<br>
<br>
> Constructors for C++ classes should initialize all of their members using<br>
> C++ initializer syntax. Each member (and superclass) should be indented on<br>
> a separate line, with the colon or comma preceding the member on that line.<br>
<a href="http://www.webkit.org/coding/coding-style.html" rel="noreferrer" target="_blank">http://www.webkit.org/coding/coding-style.html</a><br>
<br>
Best Regards,<br>
Florian<br>
<br>
Am Mittwoch, 26. August 2015, 19:15:15 schrieb Daniel Jasper:<br>
> On Wed, Aug 26, 2015 at 7:03 PM, Florian Lindner <<a href="mailto:mailinglists@xgm.de">mailinglists@xgm.de</a>><br>
> wrote:<br>
><br>
> ><br>
> > Am Mittwoch, 26. August 2015, 18:40:43 schrieb Daniel Jasper:<br>
> > > Sure, there is <a href="http://bugs.llvm.org" rel="noreferrer" target="_blank">bugs.llvm.org</a> with a dedicated "Formatter" component.<br>
> > ><br>
> > > However, the bar for adding such features is:<br>
> > > - Large project with open style guide recommending it.<br>
> ><br>
> > Why that? Of course, I'm not suggesting to change the default setting, but<br>
> > I fail to understand how adding such a feature hurts if it doesn't change<br>
> > the default.<br>
> ><br>
><br>
> Every configuration flag has a certain cost. Among other things, this<br>
> includes:<br>
> - Style flags become less discoverable<br>
> - Maintenance increases when ensuring that all combinations of flags work<br>
> as expected<br>
><br>
> I'll try to put a more detailed explanation of the reasons on some<br>
> documentation page.<br>
><br>
> In essence, we'd rather support a stricter set of rules really well instead<br>
> trying to make clang-format work for everyone but doing a bad job of it.<br>
><br>
> > - Person willing to contribute an maintain a patch.<br>
> ><br>
> > Sure.<br>
> ><br>
> > Best Regards,<br>
> > Florian<br>
> ><br>
> > ><br>
> > ><br>
> > > On Wed, Aug 26, 2015 at 5:40 PM, Florian Lindner <<a href="mailto:mailinglists@xgm.de">mailinglists@xgm.de</a>><br>
> > > wrote:<br>
> > ><br>
> > > > Am Mittwoch, 26. August 2015, 13:11:32 schrieb Daniel Jasper:<br>
> > > > > No, there isn't.<br>
> > > ><br>
> > > > Ok, thanks for that statement. Is this functionality planned somehow?<br>
> > Is<br>
> > > > there a bug tracker where I can file this as a wishlist item?<br>
> > > ><br>
> > > > Best Regards,<br>
> > > > Florian<br>
> > > ><br>
> > > > ><br>
> > > > > On Wed, Aug 26, 2015 at 11:23 AM, Florian Lindner via cfe-dev <<br>
> > > > > <a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
> > > > ><br>
> > > > > > Hello,<br>
> > > > > ><br>
> > > > > > I have code like that:<br>
> > > > > ><br>
> > > > > > ierr = KSPDestroy(&ksp);CHKERRQ(ierr);<br>
> > > > > ><br>
> > > > > > clang-format introduces a linebreak between the two statements. Is<br>
> > > > there a<br>
> > > > > > possiblity to omit that?<br>
> > > > > ><br>
> > > > > > My configuration, based on style LLVM:<br>
> > > > > ><br>
> > > > > > AllowAllParametersOfDeclarationOnNextLine: true<br>
> > > > > > AllowShortBlocksOnASingleLine: true<br>
> > > > > > AllowShortCaseLabelsOnASingleLine: true<br>
> > > > > > AllowShortIfStatementsOnASingleLine: true<br>
> > > > > > AllowShortLoopsOnASingleLine: true<br>
> > > > > > AllowShortFunctionsOnASingleLine: All<br>
> > > > > > AlwaysBreakAfterDefinitionReturnType: false<br>
> > > > > > AlwaysBreakTemplateDeclarations: false<br>
> > > > > > AlwaysBreakBeforeMultilineStrings: false<br>
> > > > > ><br>
> > > > > > (I've just set every remotely related option to don't break)<br>
> > > > > ><br>
> > > > > > Thanks,<br>
> > > > > > Florian<br>
> > > > > > _______________________________________________<br>
> > > > > > cfe-dev mailing list<br>
> > > > > > <a href="mailto:cfe-dev@lists.llvm.org">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>
</blockquote></div>