nl_after_brace_open_cmt
Whether to add a newline between the open brace and a trailing single-line comment. Requires nl_after_brace_open=true.
Possible values are true and false, default false.
Examples
true
Config:
nl_after_brace_open = true
nl_after_brace_open_cmt = true
Before:
int main()
{
int x = 1;
int y = 2;
{ //just braces
int z = x + y;
std::cout << "z value processed" << '\n';}
return 0;
}
After
int main()
{
int x = 1;
int y = 2;
{
//just braces
int z = x + y;
std::cout << "z value processed" << '\n';
}
return 0;
}
false
Config:
nl_after_brace_open = true
nl_after_brace_open_cmt = false
Before:
int main()
{
int x = 1;
int y = 2;
{ //just braces
int z = x + y;
std::cout << "z value processed" << '\n';}
return 0;
}
After
int main()
{
int x = 1;
int y = 2;
{ //just braces
int z = x + y;
std::cout << "z value processed" << '\n';
}
return 0;
}
See also
- nl_after_brace_open: Whether to add a newline after '{'. This also adds a newline before the matching '}'.
- nl_before_case: Whether to add a newline before
case
, and a blank line before acase
statement that follows a;
or}
. - nl_before_switch: Add or remove blank line before
switch
statement.