1- # 如果要从更高级别的目录继承 .editorconfig 设置,请删除以下行
1+ # 如果要从更高级别的目录继承 .editorconfig 设置,请删除以下行
22root = true
33
4+ [* ]
5+ charset = utf-8-bom
6+ end_of_line = crlf
7+ indent_style = space
8+ insert_final_newline = true
9+ trim_trailing_whitespace = true
10+ dotnet_style_qualification_for_field = false :silent
11+ dotnet_style_qualification_for_property = false :silent
12+ dotnet_style_qualification_for_method = false :silent
13+ dotnet_style_qualification_for_event = false :silent
14+ dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
15+ indent_size = 4
16+ tab_width = 4
17+ dotnet_style_operator_placement_when_wrapping = beginning_of_line
18+
419# c# 文件
520[* .cs ]
621
722# ### Core EditorConfig 选项 ####
823
924# 缩进和间距
1025indent_size = 4
11- indent_style = space
1226tab_width = 4
1327
14- # 新行首选项
15- end_of_line = crlf
16- insert_final_newline = false
17-
1828# ### .NET 编码约定 ####
1929
2030# 组织 Using
21- dotnet_separate_import_directive_groups = true
31+ dotnet_separate_import_directive_groups = false
2232dotnet_sort_system_directives_first = true
2333file_header_template = unset
2434
@@ -76,19 +86,19 @@ dotnet_style_allow_statement_immediately_after_block_experimental = true
7686# ### c# 编码约定 ####
7787
7888# var 首选项
79- csharp_style_var_elsewhere = false
80- csharp_style_var_for_built_in_types = false
81- csharp_style_var_when_type_is_apparent = false
89+ csharp_style_var_elsewhere = false : silent
90+ csharp_style_var_for_built_in_types = false : silent
91+ csharp_style_var_when_type_is_apparent = false : silent
8292
8393# Expression-bodied 成员
84- csharp_style_expression_bodied_accessors = true
85- csharp_style_expression_bodied_constructors = false
86- csharp_style_expression_bodied_indexers = true
87- csharp_style_expression_bodied_lambdas = true
88- csharp_style_expression_bodied_local_functions = false
89- csharp_style_expression_bodied_methods = false
90- csharp_style_expression_bodied_operators = false
91- csharp_style_expression_bodied_properties = true
94+ csharp_style_expression_bodied_accessors = true : silent
95+ csharp_style_expression_bodied_constructors = false : silent
96+ csharp_style_expression_bodied_indexers = true : silent
97+ csharp_style_expression_bodied_lambdas = true : silent
98+ csharp_style_expression_bodied_local_functions = false : silent
99+ csharp_style_expression_bodied_methods = false : silent
100+ csharp_style_expression_bodied_operators = false : silent
101+ csharp_style_expression_bodied_properties = true : silent
92102
93103# 模式匹配首选项
94104csharp_style_pattern_matching_over_as_with_null_check = true
@@ -99,18 +109,19 @@ csharp_style_prefer_pattern_matching = true
99109csharp_style_prefer_switch_expression = true
100110
101111# Null 检查首选项
102- csharp_style_conditional_delegate_call = true
112+ csharp_style_conditional_delegate_call = true : suggestion
103113
104114# 修饰符首选项
105- csharp_prefer_static_local_function = true
115+ csharp_prefer_static_local_function = true : suggestion
106116csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
117+ csharp_style_prefer_readonly_struct = true
107118
108119# 代码块首选项
109- csharp_prefer_braces = true
110- csharp_prefer_simple_using_statement = true
111- csharp_style_namespace_declarations = file_scoped
112- csharp_style_prefer_method_group_conversion = true
113- csharp_style_prefer_top_level_statements = true
120+ csharp_prefer_braces = true : silent
121+ csharp_prefer_simple_using_statement = true : suggestion
122+ csharp_style_namespace_declarations = file_scoped:suggestion
123+ csharp_style_prefer_method_group_conversion = true : silent
124+ csharp_style_prefer_top_level_statements = true : silent
114125
115126# 表达式级首选项
116127csharp_prefer_simple_default_expression = true
@@ -128,7 +139,7 @@ csharp_style_unused_value_assignment_preference = discard_variable
128139csharp_style_unused_value_expression_statement_preference = discard_variable
129140
130141# "using" 指令首选项
131- csharp_using_directive_placement = outside_namespace
142+ csharp_using_directive_placement = outside_namespace:silent
132143
133144# 新行首选项
134145csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true
@@ -289,3 +300,11 @@ dotnet_naming_style.以_为前缀.required_prefix = _
289300dotnet_naming_style.以_为前缀.required_suffix =
290301dotnet_naming_style.以_为前缀.word_separator =
291302dotnet_naming_style.以_为前缀.capitalization = camel_case
303+
304+ [* .csproj ]
305+ indent_size = 2
306+ tab_width = 2
307+
308+ [* .props ]
309+ indent_size = 2
310+ tab_width = 2
0 commit comments