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