Blank lines

I (almost) always put a blank line above else, catch, etc statements -

if (true) {
// processing for true
// more processing
// finish with a blank line

} else {
// processing for false
}

When I reformat, ReSharper likes to remove these blank lines, even though
I have "Keep existing line breaks" selected. Is this a bug, or is there a
setting that will stop the lines being removed?

A further annoyance (but one I've come to live with) is that when I type
the closing brace before the else, ReSharper again removes the blank line.
So as I type this:

if (true) {
// processing for true
// more processing
// finish with a blank line

}

Resharper changes it to this:

if (true) {
// processing for true
// more processing
// finish with a blank line
}

As I said, I can live with this one, but I'm not sure if it falls in the
same scope as the first issue.

Cheers -
/gerrod

PS: What markup do you use to format code nicely for the newsgroup?


doesn't appear to work... ??


Please sign in to leave a comment.