<p dir="ltr">The question is how all the other options should be called and how we can group them nicely so that we don't flood the options configuration page too much. Maybe it's time for nesting in the configuration class? </p>
<div class="gmail_quote">On Sep 17, 2015 11:50 AM, "Paul Hoad" <<a href="mailto:mydeveloperday@gmail.com">mydeveloperday@gmail.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">MyDeveloperDay added inline comments.<br>
<br>
================<br>
Comment at: docs/ClangFormatStyleOptions.rst:247<br>
@@ -246,1 +246,3 @@<br>
<br>
+**AlwaysBreakBeforeElse** (``bool``)<br>
+  If ``true``, always break before ``else``.<br>
----------------<br>
djasper wrote:<br>
> Hm, I think these should be grouped in some way and interact with BreakBeforeBraces.<br>
><br>
> I theory, I'd like to have a lot of different flags and make BreakBeforeBraces select specific presents for them. However, maybe we can put all the brace breaking options together in some nice way (don't have a very good idea yet).<br>
><br>
> Not saying that you need to do all of this, but pulling these two options out from the other BreakBeforeBraces options seems a little undesirable. They essentially also just define what we do around braces.<br>
Well I agree, ideally the BreakBeforeBraces styles should be implemented by setting the finite control on each element<br>
<br>
Then code like this<br>
<br>
if (Style.BreakBeforeBraces == FormatStyle::BS_Allman ||<br>
        Style.BreakBeforeBraces == FormatStyle::BS_GNU ||<br>
        Style.BreakBeforeBraces == FormatStyle::BS_Stroustrup ||<br>
        Style.AlwaysBreakBeforeCatch) {<br>
         ...<br>
        }<br>
<br>
could become<br>
<br>
if (Style.AlwaysBreakBeforeCatch) {<br>
    ...<br>
}<br>
<br>
This would simply require some code in the initializer that says<br>
<br>
if (Style.BreakBeforeBraces == FormatStyle::BS_Allman ||<br>
        Style.BreakBeforeBraces == FormatStyle::BS_GNU ||<br>
        Style.BreakBeforeBraces == FormatStyle::BS_Stroustrup)<br>
{<br>
    Style.AlwaysBreakBeforeCatch=true;<br>
}<br>
<br>
if (Style.BreakBeforeBraces == FormatStyle::BS_Stroustrup)<br>
{<br>
    Style.AlwaysBreakBeforeElse=true;<br>
}<br>
<br>
This would allow those of us not using one of the 5 chosen styles to build our teams style guide via the individual capabilities<br>
<br>
Removing all the BS_Stroustrup/Allman etc.. from the UnwrappedLineParser will greatly improve its readability<br>
<br>
<br>
<a href="http://reviews.llvm.org/D12492" rel="noreferrer" target="_blank">http://reviews.llvm.org/D12492</a><br>
<br>
<br>
<br>
</blockquote></div>