removing blank lines before 'else'
I have a colleague who likes to add blank lines before the else in an if-else statement, against rules.
if (a == 2)
a++;
else if (a == 4)
{
a = res1;
a++;
}
How can I set resharper to remove that blank line? I don't want to manually go regex'ing to remove them.
Please sign in to leave a comment.
Hello,
R# built-in formatter can't do that currently. There's the “Keep max blank lines in code” setting but it affects all blank lines. I've filed https://youtrack.jetbrains.com/issue/RSCPP-35001/. You can switch to clang-format, but I don't think it can do that as well.
Thanks for the feedback!