Is there an option in ReSharper to not remove the blank line I put between the namespace and class definition?
Is there an option in ReSharper to not remove the blank line I put between the namespace and class definition?
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?
3 Answers
3
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
:
ReSharper | Options -> Code Editing | C# | Formatting style | Blank Lines
Remove blank lines after "{" and before "}" in declarations
Around namespace
Around type
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
.
ReSharper | Options -> Code Editing | C# | Formatting style | Other
Line feed at end of file
This should be the accepted answer now
– Svein Fidjestøl
May 9 '17 at 10:06
Visual Studio menu: ReSharper > Options...
ReSharper > Options...
Type in the search box "Line feed at end of file":
By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.
I was still able to accept your answer, thanks a lot!
– user215361
Sep 30 '12 at 17:52