codemaid icon indicating copy to clipboard operation
codemaid copied to clipboard

Cleaning: Insert blank line padding after closing brace (SA1513)

Open codecadwallader opened this issue 9 years ago • 3 comments

Migrated from https://trello.com/c/t3ZG4jsB with 10 votes

    if( condition one ) {
        line one;
        line two;
        line three;
    }
    if( condition two || condition three ) {
        line four;
        line five;
    }

In this case it would be preferable to place a blank line between the if statements.

Exceptions would apply to chained statements (if-else-else if, try-catch-finally) as well as nested blocks.

NOTE: This feature is dependent on a conversion to the Roslyn APIs.

This is SA1513 btw. However there is another StyleCop rule that will not allow the blank line if the next token is another } (SA1508) so that needs to be considered when looking at this.

codecadwallader avatar Apr 02 '16 12:04 codecadwallader

I agree. I've been waiting for years for JetBrains to implement this feature in ReSharper. It would be great to have it available in CodeMaid.

ThoughtDrive avatar Jun 08 '16 16:06 ThoughtDrive

Is there any update on this issue? @codecadwallader

anshulahuja98 avatar Aug 25 '21 07:08 anshulahuja98

@anshulahuja98 This feature request is still dependent on Roslyn APIs which we have not implemented.

codecadwallader avatar Aug 27 '21 12:08 codecadwallader