EditorConfig 属性(适用于 C++):空行
保留现有格式
保留声明中的最大空行
属性名称:
[resharper_]cpp_keep_blank_lines_in_declarations, [resharper_]keep_blank_lines_in_declarations
可能的值:
整数
示例:
值:0 |
|---|
void f()
{
}
void g()
{
}
|
值:1 |
|---|
void f()
{
}
void g()
{
}
|
值:2 |
|---|
void f()
{
}
void g()
{
}
|
保留代码中的最大空行
属性名称:
[resharper_]cpp_keep_blank_lines_in_code, [resharper_]keep_blank_lines_in_code
可能的值:
整数
示例:
值:0 |
|---|
void f()
{
g();
g();
}
|
值:1 |
|---|
void f()
{
g();
g();
}
|
值:2 |
|---|
void f()
{
g();
g();
}
|
移除声明中 '{' 之后和 '}' 之前的空行
属性名称:
[resharper_]cpp_remove_blank_lines_near_braces_in_declarations, [resharper_]remove_blank_lines_near_braces_in_declarations
可能的值:
true|false
示例:
true |
|---|
class A
{
public:
int x;
private:
int y;
};
|
false |
|---|
class A
{
public:
int x;
private:
int y;
};
|
移除代码中 '{' 之后和 '}' 之前的空行
属性名称:
[resharper_]cpp_remove_blank_lines_near_braces_in_code, [resharper_]remove_blank_lines_near_braces_in_code
可能的值:
true|false
示例:
true |
|---|
void f()
{
int x;
int y;
return;
};
|
false |
|---|
void f()
{
int x;
int y;
return;
};
|
空白行
类/结构/枚举定义周围
属性名称:
[resharper_]cpp_blank_lines_around_class_definition, [resharper_]blank_lines_around_class_definition
可能的值:
整数
示例:
值:0 |
|---|
class C
{
};
class D
{
};
|
值:1 |
|---|
class C
{
};
class D
{
};
|
值:2 |
|---|
class C
{
};
class D
{
};
|
函数声明周围
属性名称:
[resharper_]cpp_blank_lines_around_function_declaration, [resharper_]blank_lines_around_function_declaration
可能的值:
整数
示例:
值:0 |
|---|
void f();
void g();
|
值:1 |
|---|
void f();
void g();
|
值:2 |
|---|
void f();
void g();
|
函数定义周围
属性名称:
[resharper_]cpp_blank_lines_around_function_definition, [resharper_]blank_lines_around_function_definition
可能的值:
整数
示例:
值:0 |
|---|
void f()
{
f();
f();
}
void g()
{
g();
g();
}
|
值:1 |
|---|
void f()
{
f();
f();
}
void g()
{
g();
g();
}
|
值:2 |
|---|
void f()
{
f();
f();
}
void g()
{
g();
g();
}
|
单行函数定义周围
属性名称:
[resharper_]cpp_blank_lines_around_single_line_function_definition, [resharper_]blank_lines_around_single_line_function_definition
可能的值:
整数
示例:
值:0 |
|---|
void f()
{
}
void g()
{
}
|
值:1 |
|---|
void f()
{
}
void g()
{
}
|
值:2 |
|---|
void f()
{
}
void g()
{
}
|
命名空间周围
属性名称:
[resharper_]cpp_blank_lines_around_namespace, [resharper_]blank_lines_around_namespace
可能的值:
整数
示例:
值:0 |
|---|
namespace N1
{
}
namespace N2
{
}
|
值:1 |
|---|
namespace N1
{
}
namespace N2
{
}
|
值:2 |
|---|
namespace N1
{
}
namespace N2
{
}
|
其他定义和声明周围
属性名称:
[resharper_]cpp_blank_lines_around_other_declaration, [resharper_]blank_lines_around_other_declaration
可能的值:
整数
示例:
值:0 |
|---|
int x;
int y;
|
值:1 |
|---|
int x;
int y;
|
值:2 |
|---|
int x;
int y;
|
在访问说明符之前
属性名称:
[resharper_]cpp_blank_lines_before_access_specifier, [resharper_]blank_lines_before_access_specifier
可能的值:
整数
示例:
值:0 |
|---|
class A
{
public:
int x;
private:
int y;
};
|
值:1 |
|---|
class A
{
public:
int x;
private:
int y;
};
|
值:2 |
|---|
class A
{
public:
int x;
private:
int y;
};
|
在访问说明符之后
属性名称:
[resharper_]cpp_blank_lines_after_access_specifier, [resharper_]blank_lines_after_access_specifier
可能的值:
整数
示例:
值:0 |
|---|
class A
{
public:
int x;
private:
int y;
};
|
值:1 |
|---|
class A
{
public:
int x;
private:
int y;
};
|
值:2 |
|---|
class A
{
public:
int x;
private:
int y;
};
|