If there is a one liner if() statement without brackets and I have nl_if_leave_one_liners = false, it doesn't add a line break unless nl_if_brace=true. These configuration options should be independent of each other. I never want to see one-liner code and always want the conditional broken from the statements. But if braces are around, I want the braces on the same line as the if.
Thus, nl_if_leave_one_liners=false and nl_if_brace=false should give this:
if (a) b++;
should become:
if (a)
b++;
and:
if (a) { b++; }
should become:
if (a) {
b++;
}
(This is related to bug 291: http://sourceforge.net/p/uncrustify/bugs/291/)
This is with version 0.61.
The option:
nl_if_leave_one_liners = true
is stronger as the option:
nl_if_brace = force
The option:
nl_if_leave_one_liners = true
is stronger as the option:
nl_if_brace = force