Reputation:
Every time I let ReSharper format my code, it removes the blank line I put between the namespace and class declaration.
From this:
namespace Test {
public class Test {
To this:
namespace Test {
public class Test {
It does the same thing with the blank lines at the closing braces of both. All my "blank line" settings are set to 1, except for single line fields.
Is there an option I'm missing?
Upvotes: 12
Views: 6208
Reputation: 5450
Visual Studio menu: ReSharper > Options...
Type in the search box "Line feed at end of file":
Upvotes: 14
Reputation: 523
This is actually now an option (as of June 2016). Go to ReSharper | Options -> Code Editing | C# | Formatting style | Other
and check Line feed at end of file
.
Upvotes: 20
Reputation: 10118
Fsck, just 10 minutes ahead of me. Well, I'll answer anyway. Bad news is that it's a long-time feature request http://youtrack.jetbrains.com/issue/RSRP-74903
Good news is that it would fixed in the tomorrow's 7.1 EAP build. There would be new options in ReSharper | Options -> Code Editing | C# | Formatting style | Blank Lines
:
Remove blank lines after "{" and before "}" in declarations
(turn it off to prevent ReSharper from removing blank line) and Around namespace
and Around type
(set it to non-zero value to force ReSharper to add blank lines).Upvotes: 2