clang-format: empty line before and after control statements

Viewed 25

Is there any possibility to achieve inserting an empty line before and after control statemets (for, if etc.)?

E.g. I have the following source code:

if(bCondition)
{
    // some code
}
for(int i : vecOfInts)
{
    // some code
}
if(bAnotherCondition)
{
    // some code
}

and this is what I want:

if(bCondition)
{
    // some code
}

for(int i : vecOfInts)
{
    // some code
}

if(bAnotherCondition)
{
    // some code
}
1 Answers
Related