ReSharper 2023.1 Help

EditorConfig properties for C++: Blank Lines

Preserve existing formatting

Keep max blank lines in declarations

Property names:

[resharper_]cpp_keep_blank_lines_in_declarations, [resharper_]keep_blank_lines_in_declarations

Possible values:

an integer

Examples:

value: 0

void f() { } void g() { }

value: 1

void f() { } void g() { }

value: 2

void f() { } void g() { }

Keep max blank lines in code

Property names:

[resharper_]cpp_keep_blank_lines_in_code, [resharper_]keep_blank_lines_in_code

Possible values:

an integer

Examples:

value: 0

void f() { g(); g(); }

value: 1

void f() { g(); g(); }

value: 2

void f() { g(); g(); }

Remove blank lines after '{' and before '}' in declarations

Property names:

[resharper_]cpp_remove_blank_lines_near_braces_in_declarations, [resharper_]remove_blank_lines_near_braces_in_declarations

Possible values:

true | false

Examples:

true

class A { public: int x; private: int y; };

false

class A { public: int x; private: int y; };

Remove blank lines after '{' and before '}' in code

Property names:

[resharper_]cpp_remove_blank_lines_near_braces_in_code, [resharper_]remove_blank_lines_near_braces_in_code

Possible values:

true | false

Examples:

true

void f() { int x; int y; return; };

false

void f() { int x; int y; return; };

Blank lines

Around class/struct/enum definition

Property names:

[resharper_]cpp_blank_lines_around_class_definition, [resharper_]blank_lines_around_class_definition

Possible values:

an integer

Examples:

value: 0

class C { }; class D { };

value: 1

class C { }; class D { };

value: 2

class C { }; class D { };

Around function declarations

Property names:

[resharper_]cpp_blank_lines_around_function_declaration, [resharper_]blank_lines_around_function_declaration

Possible values:

an integer

Examples:

value: 0

void f(); void g();

value: 1

void f(); void g();

value: 2

void f(); void g();

Around function definitions

Property names:

[resharper_]cpp_blank_lines_around_function_definition, [resharper_]blank_lines_around_function_definition

Possible values:

an integer

Examples:

value: 0

void f() { f(); f(); } void g() { g(); g(); }

value: 1

void f() { f(); f(); } void g() { g(); g(); }

value: 2

void f() { f(); f(); } void g() { g(); g(); }

Around single line function definitions

Property names:

[resharper_]cpp_blank_lines_around_single_line_function_definition, [resharper_]blank_lines_around_single_line_function_definition

Possible values:

an integer

Examples:

value: 0

void f() { } void g() { }

value: 1

void f() { } void g() { }

value: 2

void f() { } void g() { }

Around namespaces

Property names:

[resharper_]cpp_blank_lines_around_namespace, [resharper_]blank_lines_around_namespace

Possible values:

an integer

Examples:

value: 0

namespace N1 { } namespace N2 { }

value: 1

namespace N1 { } namespace N2 { }

value: 2

namespace N1 { } namespace N2 { }

Around other definitions and declarations

Property names:

[resharper_]cpp_blank_lines_around_other_declaration, [resharper_]blank_lines_around_other_declaration

Possible values:

an integer

Examples:

value: 0

int x; int y;

value: 1

int x; int y;

value: 2

int x; int y;

Before access specifier

Property names:

[resharper_]cpp_blank_lines_before_access_specifier, [resharper_]blank_lines_before_access_specifier

Possible values:

an integer

Examples:

value: 0

class A { public: int x; private: int y; };

value: 1

class A { public: int x; private: int y; };

value: 2

class A { public: int x; private: int y; };

After access specifier

Property names:

[resharper_]cpp_blank_lines_after_access_specifier, [resharper_]blank_lines_after_access_specifier

Possible values:

an integer

Examples:

value: 0

class A { public: int x; private: int y; };

value: 1

class A { public: int x; private: int y; };

value: 2

class A { public: int x; private: int y; };
Last modified: 27 March 2023