星火微课系统客户端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

.editorconfig 20KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409
  1. root = true
  2. # 如果要从更高级别的目录继承 .editorconfig 设置,请删除以下行
  3. [*]
  4. end_of_line = crlf
  5. charset = utf-8-bom
  6. indent_size = 4
  7. tab_width = 4
  8. trim_trailing_whitespace = true
  9. resharper_xaml_binding_without_context_not_resolved_highlighting = none
  10. resharper_xaml_binding_with_context_not_resolved_highlighting = none
  11. # ReSharper properties
  12. resharper_apply_auto_detected_rules = false
  13. resharper_apply_on_completion = true
  14. resharper_blank_lines_after_block_statements = 0
  15. resharper_blank_lines_after_start_comment = 0
  16. resharper_blank_lines_around_local_method = 0
  17. resharper_braces_for_for = required
  18. resharper_braces_for_foreach = required
  19. resharper_braces_for_ifelse = required
  20. resharper_braces_for_while = required
  21. resharper_braces_redundant = false
  22. resharper_case_block_braces = next_line_shifted_2
  23. resharper_csharp_keep_blank_lines_in_code = 0
  24. resharper_csharp_keep_blank_lines_in_declarations = 1
  25. resharper_csharp_max_line_length = 300
  26. resharper_csharp_naming_rule.constants = AA_BB
  27. resharper_csharp_naming_rule.interfaces = I + AaBb
  28. resharper_csharp_naming_rule.static_readonly = AaBb
  29. resharper_csharp_naming_rule.types_and_namespaces = AaBb, I + AaBb + I
  30. resharper_csharp_wrap_arguments_style = chop_if_long
  31. resharper_csharp_wrap_before_declaration_lpar = true
  32. resharper_csharp_wrap_extends_list_style = chop_if_long
  33. resharper_csharp_wrap_parameters_style = chop_if_long
  34. resharper_empty_block_style = together_same_line
  35. resharper_enforce_line_ending_style = true
  36. resharper_keep_existing_declaration_block_arrangement = true
  37. resharper_keep_existing_embedded_block_arrangement = true
  38. resharper_keep_existing_enum_arrangement = true
  39. resharper_keep_existing_expr_member_arrangement = false
  40. resharper_keep_existing_initializer_arrangement = false
  41. resharper_keep_existing_linebreaks = false
  42. resharper_max_array_initializer_elements_on_line = 2
  43. resharper_max_attribute_length_for_same_line = 2
  44. resharper_max_enum_members_on_line = 2
  45. resharper_max_formal_parameters_on_line = 2
  46. resharper_max_initializer_elements_on_line = 2
  47. resharper_max_invocation_arguments_on_line = 2
  48. resharper_new_line_before_while = true
  49. resharper_show_autodetect_configure_formatting_tip = false
  50. resharper_use_indent_from_vs = false
  51. resharper_wrap_after_declaration_lpar = true
  52. resharper_wrap_after_invocation_lpar = true
  53. resharper_wrap_array_initializer_style = chop_if_long
  54. resharper_wrap_before_declaration_rpar = true
  55. resharper_wrap_before_invocation_rpar = true
  56. resharper_wrap_chained_binary_expressions = chop_if_long
  57. resharper_wrap_chained_binary_patterns = chop_if_long
  58. resharper_wrap_chained_method_calls = chop_if_long
  59. resharper_wrap_enum_declaration = chop_if_long
  60. resharper_wrap_list_pattern = chop_if_long
  61. resharper_wrap_switch_expression = chop_if_long
  62. resharper_xmldoc_attribute_style = on_single_line
  63. resharper_xml_attribute_style = on_different_lines
  64. resharper_xml_max_blank_lines_between_tags = 1
  65. resharper_xml_pi_attribute_style = on_different_lines
  66. # Microsoft .NET properties
  67. csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async, file, required:suggestion
  68. csharp_style_expression_bodied_accessors = true:suggestion
  69. csharp_style_expression_bodied_properties = true:suggestion
  70. csharp_style_namespace_declarations = block_scoped:suggestion
  71. csharp_style_prefer_utf8_string_literals = true:suggestion
  72. csharp_style_var_elsewhere = false:warning
  73. csharp_style_var_for_built_in_types = false:warning
  74. csharp_style_var_when_type_is_apparent = false:warning
  75. csharp_using_directive_placement = inside_namespace:silent
  76. dotnet_naming_rule.constants_rule.import_to_resharper = as_predefined
  77. dotnet_naming_rule.constants_rule.severity = warning
  78. dotnet_naming_rule.constants_rule.style = all_upper_style
  79. dotnet_naming_rule.constants_rule.symbols = constants_symbols
  80. dotnet_naming_rule.interface_should_be_begins_with_i_rule.import_to_resharper = as_predefined
  81. dotnet_naming_rule.interface_should_be_begins_with_i_rule.severity = warning
  82. dotnet_naming_rule.interface_should_be_begins_with_i_rule.style = i_upper_camel_case_style
  83. dotnet_naming_rule.interface_should_be_begins_with_i_rule.symbols = interface_should_be_begins_with_i_symbols
  84. dotnet_naming_rule.method_should_be_pascal_case_rule.import_to_resharper = as_predefined
  85. dotnet_naming_rule.method_should_be_pascal_case_rule.severity = warning
  86. dotnet_naming_rule.method_should_be_pascal_case_rule.style = upper_camel_case_style
  87. dotnet_naming_rule.method_should_be_pascal_case_rule.symbols = method_should_be_pascal_case_symbols
  88. dotnet_naming_rule.private_constants_rule.import_to_resharper = as_predefined
  89. dotnet_naming_rule.private_constants_rule.severity = warning
  90. dotnet_naming_rule.private_constants_rule.style = all_upper_style
  91. dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols
  92. dotnet_naming_rule.property_rule.import_to_resharper = as_predefined
  93. dotnet_naming_rule.property_rule.severity = none
  94. dotnet_naming_rule.property_rule.style = upper_camel_case_style
  95. dotnet_naming_rule.property_rule.symbols = property_symbols
  96. dotnet_naming_rule.public_fields_rule.import_to_resharper = as_predefined
  97. dotnet_naming_rule.public_fields_rule.severity = none
  98. dotnet_naming_rule.public_fields_rule.style = upper_camel_case_style
  99. dotnet_naming_rule.public_fields_rule.symbols = public_fields_symbols
  100. dotnet_naming_rule.static_readonly_rule.import_to_resharper = as_predefined
  101. dotnet_naming_rule.static_readonly_rule.severity = warning
  102. dotnet_naming_rule.static_readonly_rule.style = upper_camel_case_style
  103. dotnet_naming_rule.static_readonly_rule.symbols = static_readonly_symbols
  104. dotnet_naming_rule.types_and_namespaces_rule.import_to_resharper = as_predefined
  105. dotnet_naming_rule.types_and_namespaces_rule.resharper_style = AaBb, I + AaBb + I
  106. dotnet_naming_rule.types_and_namespaces_rule.severity = warning
  107. dotnet_naming_rule.types_and_namespaces_rule.style = upper_camel_case_style
  108. dotnet_naming_rule.types_and_namespaces_rule.symbols = types_and_namespaces_symbols
  109. dotnet_naming_rule.types_should_be_pascal_case_rule.import_to_resharper = True
  110. dotnet_naming_rule.types_should_be_pascal_case_rule.resharper_description = types_should_be_pascal_case
  111. dotnet_naming_rule.types_should_be_pascal_case_rule.resharper_guid = a43c3ac7-d8a7-48b2-8484-495fe7e8c999
  112. dotnet_naming_rule.types_should_be_pascal_case_rule.severity = warning
  113. dotnet_naming_rule.types_should_be_pascal_case_rule.style = upper_camel_case_style
  114. dotnet_naming_rule.types_should_be_pascal_case_rule.symbols = types_should_be_pascal_case_symbols
  115. dotnet_naming_style.all_upper_style.capitalization = all_upper
  116. dotnet_naming_style.all_upper_style.word_separator = _
  117. dotnet_naming_style.i_upper_camel_case_style.capitalization = pascal_case
  118. dotnet_naming_style.i_upper_camel_case_style.required_prefix = I
  119. dotnet_naming_style.upper_camel_case_style.capitalization = pascal_case
  120. dotnet_naming_symbols.constants_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
  121. dotnet_naming_symbols.constants_symbols.applicable_kinds = field
  122. dotnet_naming_symbols.constants_symbols.required_modifiers = const
  123. dotnet_naming_symbols.interface_should_be_begins_with_i_symbols.applicable_accessibilities = local,public,internal,private,protected,protected_internal,private_protected
  124. dotnet_naming_symbols.interface_should_be_begins_with_i_symbols.applicable_kinds = interface
  125. dotnet_naming_symbols.interface_should_be_begins_with_i_symbols.resharper_applicable_kinds = interface
  126. dotnet_naming_symbols.interface_should_be_begins_with_i_symbols.resharper_required_modifiers = any
  127. dotnet_naming_symbols.method_should_be_pascal_case_symbols.applicable_accessibilities = local,public,internal,private,protected,protected_internal,private_protected
  128. dotnet_naming_symbols.method_should_be_pascal_case_symbols.applicable_kinds = method
  129. dotnet_naming_symbols.method_should_be_pascal_case_symbols.resharper_applicable_kinds = method
  130. dotnet_naming_symbols.method_should_be_pascal_case_symbols.resharper_required_modifiers = any
  131. dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private
  132. dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field
  133. dotnet_naming_symbols.private_constants_symbols.required_modifiers = const
  134. dotnet_naming_symbols.property_symbols.applicable_accessibilities = *
  135. dotnet_naming_symbols.property_symbols.applicable_kinds = property
  136. dotnet_naming_symbols.public_fields_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
  137. dotnet_naming_symbols.public_fields_symbols.applicable_kinds = field
  138. dotnet_naming_symbols.static_readonly_symbols.applicable_accessibilities = public,internal,protected,protected_internal,private_protected
  139. dotnet_naming_symbols.static_readonly_symbols.applicable_kinds = field
  140. dotnet_naming_symbols.static_readonly_symbols.required_modifiers = static,readonly
  141. dotnet_naming_symbols.types_and_namespaces_symbols.applicable_accessibilities = *
  142. dotnet_naming_symbols.types_and_namespaces_symbols.applicable_kinds = namespace,class,struct,enum,delegate
  143. dotnet_naming_symbols.types_should_be_pascal_case_symbols.applicable_accessibilities = local,public,internal,private,protected,protected_internal,private_protected
  144. dotnet_naming_symbols.types_should_be_pascal_case_symbols.applicable_kinds = class,struct,interface,enum
  145. dotnet_naming_symbols.types_should_be_pascal_case_symbols.resharper_applicable_kinds = class,struct,interface,enum
  146. dotnet_naming_symbols.types_should_be_pascal_case_symbols.resharper_required_modifiers = any
  147. dotnet_separate_import_directive_groups = true
  148. dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:none
  149. dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:none
  150. dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:none
  151. dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
  152. dotnet_style_predefined_type_for_member_access = true:suggestion
  153. dotnet_style_qualification_for_event = false:suggestion
  154. dotnet_style_qualification_for_field = false:suggestion
  155. dotnet_style_qualification_for_method = false:suggestion
  156. dotnet_style_qualification_for_property = false:suggestion
  157. dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
  158. # ReSharper inspection severities
  159. resharper_arrange_namespace_body_highlighting = hint
  160. resharper_arrange_static_member_qualifier_highlighting = none
  161. resharper_arrange_this_qualifier_highlighting = hint
  162. resharper_arrange_type_member_modifiers_highlighting = hint
  163. resharper_arrange_type_modifiers_highlighting = hint
  164. resharper_built_in_type_reference_style_for_member_access_highlighting = hint
  165. resharper_built_in_type_reference_style_highlighting = hint
  166. resharper_check_namespace_highlighting = none
  167. resharper_convert_to_using_declaration_highlighting = hint
  168. resharper_not_accessed_field_local_highlighting = none
  169. resharper_redundant_base_qualifier_highlighting = warning
  170. resharper_redundant_name_qualifier_highlighting = none
  171. resharper_suggest_discard_declaration_var_style_highlighting = suggestion
  172. resharper_unused_member_global_highlighting = none
  173. resharper_unused_member_local_highlighting = none
  174. # c# 文件
  175. [*.cs]
  176. #### Core EditorConfig 选项 ####
  177. # 缩进和间距
  178. indent_size = 4
  179. indent_style = space
  180. tab_width = 4
  181. # 新行首选项
  182. end_of_line = crlf
  183. insert_final_newline = false
  184. #### .NET 编码约定 ####
  185. # 组织 Using
  186. dotnet_separate_import_directive_groups = true
  187. dotnet_sort_system_directives_first = true
  188. file_header_template =
  189. # this. 和 Me. 首选项
  190. dotnet_style_qualification_for_event = false
  191. dotnet_style_qualification_for_field = false
  192. dotnet_style_qualification_for_method = false
  193. dotnet_style_qualification_for_property = false
  194. # 语言关键字与 bcl 类型首选项
  195. dotnet_style_predefined_type_for_locals_parameters_members = true
  196. dotnet_style_predefined_type_for_member_access = true
  197. # 括号首选项
  198. dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
  199. dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
  200. dotnet_style_parentheses_in_other_operators = never_if_unnecessary
  201. dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
  202. # 修饰符首选项
  203. dotnet_style_require_accessibility_modifiers = for_non_interface_members
  204. # 表达式级首选项
  205. dotnet_style_coalesce_expression = true
  206. dotnet_style_collection_initializer = true
  207. dotnet_style_explicit_tuple_names = true
  208. dotnet_style_namespace_match_folder = true
  209. dotnet_style_null_propagation = true
  210. dotnet_style_object_initializer = true:silent
  211. dotnet_style_operator_placement_when_wrapping = beginning_of_line
  212. dotnet_style_prefer_auto_properties = true
  213. dotnet_style_prefer_compound_assignment = true
  214. dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
  215. dotnet_style_prefer_conditional_expression_over_return = true:suggestion
  216. dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
  217. dotnet_style_prefer_inferred_anonymous_type_member_names = true
  218. dotnet_style_prefer_inferred_tuple_names = true
  219. dotnet_style_prefer_is_null_check_over_reference_equality_method = true
  220. dotnet_style_prefer_simplified_boolean_expressions = true
  221. dotnet_style_prefer_simplified_interpolation = true
  222. # 字段首选项
  223. dotnet_style_readonly_field = false:silent
  224. # 参数首选项
  225. dotnet_code_quality_unused_parameters = all
  226. # 禁止显示首选项
  227. dotnet_remove_unnecessary_suppression_exclusions = none
  228. # 新行首选项
  229. dotnet_style_allow_multiple_blank_lines_experimental = false:suggestion
  230. dotnet_style_allow_statement_immediately_after_block_experimental = true
  231. #### c# 编码约定 ####
  232. # var 首选项
  233. csharp_style_var_elsewhere = false
  234. csharp_style_var_for_built_in_types = false
  235. csharp_style_var_when_type_is_apparent = false
  236. # Expression-bodied 成员
  237. csharp_style_expression_bodied_accessors = true
  238. csharp_style_expression_bodied_constructors = false
  239. csharp_style_expression_bodied_indexers = true
  240. csharp_style_expression_bodied_lambdas = true
  241. csharp_style_expression_bodied_local_functions = false
  242. csharp_style_expression_bodied_methods = false
  243. csharp_style_expression_bodied_operators = false
  244. csharp_style_expression_bodied_properties = true
  245. # 模式匹配首选项
  246. csharp_style_pattern_matching_over_as_with_null_check = true:warning
  247. csharp_style_pattern_matching_over_is_with_cast_check = true:warning
  248. csharp_style_prefer_extended_property_pattern = true
  249. csharp_style_prefer_not_pattern = true:warning
  250. csharp_style_prefer_pattern_matching = true:warning
  251. csharp_style_prefer_switch_expression = true
  252. # Null 检查首选项
  253. csharp_style_conditional_delegate_call = true
  254. # 修饰符首选项
  255. csharp_prefer_static_local_function = false:silent
  256. csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
  257. csharp_style_prefer_readonly_struct = false:silent
  258. csharp_style_prefer_readonly_struct_member = true
  259. # 代码块首选项
  260. csharp_prefer_braces = true
  261. csharp_prefer_simple_using_statement = true
  262. csharp_style_namespace_declarations = block_scoped
  263. csharp_style_prefer_method_group_conversion = true
  264. csharp_style_prefer_top_level_statements = true
  265. # 表达式级首选项
  266. csharp_prefer_simple_default_expression = true
  267. csharp_style_deconstructed_variable_declaration = true
  268. csharp_style_implicit_object_creation_when_type_is_apparent = true
  269. csharp_style_inlined_variable_declaration = true
  270. csharp_style_prefer_index_operator = true
  271. csharp_style_prefer_local_over_anonymous_function = true
  272. csharp_style_prefer_null_check_over_type_check = true
  273. csharp_style_prefer_range_operator = true
  274. csharp_style_prefer_tuple_swap = true
  275. csharp_style_prefer_utf8_string_literals = true
  276. csharp_style_throw_expression = true
  277. csharp_style_unused_value_assignment_preference = discard_variable
  278. csharp_style_unused_value_expression_statement_preference = discard_variable
  279. # "using" 指令首选项
  280. csharp_using_directive_placement = inside_namespace:warning
  281. # 新行首选项
  282. csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false
  283. csharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental = true
  284. csharp_style_allow_blank_line_after_token_in_conditional_expression_experimental = true
  285. csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false
  286. csharp_style_allow_embedded_statements_on_same_line_experimental = true
  287. #### C# 格式规则 ####
  288. # 新行首选项
  289. csharp_new_line_before_catch = true
  290. csharp_new_line_before_else = true
  291. csharp_new_line_before_finally = true
  292. csharp_new_line_before_members_in_anonymous_types = true
  293. csharp_new_line_before_members_in_object_initializers = true
  294. csharp_new_line_before_open_brace = all
  295. csharp_new_line_between_query_expression_clauses = true
  296. # 缩进首选项
  297. csharp_indent_block_contents = true
  298. csharp_indent_braces = false
  299. csharp_indent_case_contents = true
  300. csharp_indent_case_contents_when_block = true
  301. csharp_indent_labels = no_change
  302. csharp_indent_switch_labels = true
  303. # 空格键首选项
  304. csharp_space_after_cast = false
  305. csharp_space_after_colon_in_inheritance_clause = true
  306. csharp_space_after_comma = true
  307. csharp_space_after_dot = false
  308. csharp_space_after_keywords_in_control_flow_statements = true
  309. csharp_space_after_semicolon_in_for_statement = true
  310. csharp_space_around_binary_operators = before_and_after
  311. csharp_space_around_declaration_statements = false
  312. csharp_space_before_colon_in_inheritance_clause = true
  313. csharp_space_before_comma = false
  314. csharp_space_before_dot = false
  315. csharp_space_before_open_square_brackets = false
  316. csharp_space_before_semicolon_in_for_statement = false
  317. csharp_space_between_empty_square_brackets = false
  318. csharp_space_between_method_call_empty_parameter_list_parentheses = false
  319. csharp_space_between_method_call_name_and_opening_parenthesis = false
  320. csharp_space_between_method_call_parameter_list_parentheses = false
  321. csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
  322. csharp_space_between_method_declaration_name_and_open_parenthesis = false
  323. csharp_space_between_method_declaration_parameter_list_parentheses = false
  324. csharp_space_between_parentheses = false
  325. csharp_space_between_square_brackets = false
  326. # 包装首选项
  327. csharp_preserve_single_line_blocks = true
  328. csharp_preserve_single_line_statements = false
  329. #### 命名样式 ####
  330. # 命名规则
  331. dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
  332. dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
  333. dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
  334. dotnet_naming_rule.types_should_be_pascal_case.severity = warning
  335. dotnet_naming_rule.types_should_be_pascal_case.symbols = types
  336. dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
  337. dotnet_naming_rule.method_should_be_pascal_case.severity = warning
  338. dotnet_naming_rule.method_should_be_pascal_case.symbols = method
  339. dotnet_naming_rule.method_should_be_pascal_case.style = pascal_case
  340. # 符号规范
  341. dotnet_naming_symbols.interface.applicable_kinds = interface
  342. dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  343. dotnet_naming_symbols.interface.required_modifiers =
  344. dotnet_naming_symbols.method.applicable_kinds = method
  345. dotnet_naming_symbols.method.applicable_accessibilities = *
  346. dotnet_naming_symbols.method.required_modifiers =
  347. dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
  348. dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  349. dotnet_naming_symbols.types.required_modifiers =
  350. # 命名样式
  351. dotnet_naming_style.pascal_case.required_prefix =
  352. dotnet_naming_style.pascal_case.required_suffix =
  353. dotnet_naming_style.pascal_case.word_separator =
  354. dotnet_naming_style.pascal_case.capitalization = pascal_case
  355. dotnet_naming_style.begins_with_i.required_prefix = I
  356. dotnet_naming_style.begins_with_i.required_suffix =
  357. dotnet_naming_style.begins_with_i.word_separator =
  358. dotnet_naming_style.begins_with_i.capitalization = pascal_case
  359. [*.{appxmanifest,asax,ascx,aspx,axaml,axml,build,config,cs,cshtml,csproj,css,dbml,discomap,dtd,htm,html,jsproj,lsproj,master,njsproj,nuspec,paml,proj,props,razor,resw,resx,skin,StyleCop,targets,tasks,vb,vbproj,xaml,xamlx,xml,xoml,xsd}]
  360. indent_style = space
  361. indent_size = 4
  362. tab_width = 4