You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

.editorconfig 18 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380
  1. ###############################################################################
  2. # EditorConfig is awesome: http://EditorConfig.org
  3. ###############################################################################
  4. ###############################################################################
  5. # Top-most EditorConfig file
  6. ###############################################################################
  7. root = true
  8. ###############################################################################
  9. # Set default behavior to:
  10. # a UTF-8 encoding,
  11. # Unix-style line endings,
  12. # a newline ending the file,
  13. # 4 space indentation, and
  14. # trimming of trailing whitespace
  15. ###############################################################################
  16. [*]
  17. charset = utf-8
  18. end_of_line = lf
  19. insert_final_newline = true
  20. indent_style = space
  21. indent_size = 4
  22. trim_trailing_whitespace = true
  23. ###############################################################################
  24. # Set file behavior to:
  25. # 2 space indentation
  26. ###############################################################################
  27. [*.{cmd,config,csproj,json,nuspec,props,ps1,resx,sh,targets,yml}]
  28. indent_size = 2
  29. ###############################################################################
  30. # Set file behavior to:
  31. # Windows-style line endings, and
  32. # tabular indentation
  33. ###############################################################################
  34. [*.sln]
  35. end_of_line = crlf
  36. indent_style = tab
  37. ###############################################################################
  38. # Set dotnet naming rules to:
  39. # suggest async members be pascal case suffixed with Async
  40. # suggest const declarations be pascal case
  41. # suggest interfaces be pascal case prefixed with I
  42. # suggest parameters be camel case
  43. # suggest private and internal static fields be pascal case
  44. # suggest private and internal fields be camel case and prefixed with underscore
  45. # suggest public and protected declarations be pascal case
  46. # suggest static readonly declarations be pascal case
  47. # suggest type parameters be prefixed with T
  48. ###############################################################################
  49. [*.cs]
  50. dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.severity = suggestion
  51. dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.style = pascal_case_suffixed_with_async
  52. dotnet_naming_rule.async_members_should_be_pascal_case_suffixed_with_async.symbols = async_members
  53. dotnet_naming_rule.const_declarations_should_be_pascal_case.severity = suggestion
  54. dotnet_naming_rule.const_declarations_should_be_pascal_case.style = pascal_case
  55. dotnet_naming_rule.const_declarations_should_be_pascal_case.symbols = const_declarations
  56. dotnet_naming_rule.interfaces_should_be_pascal_case_prefixed_with_i.severity = suggestion
  57. dotnet_naming_rule.interfaces_should_be_pascal_case_prefixed_with_i.style = pascal_case_prefixed_with_i
  58. dotnet_naming_rule.interfaces_should_be_pascal_case_prefixed_with_i.symbols = interfaces
  59. dotnet_naming_rule.parameters_should_be_camel_case.severity = suggestion
  60. dotnet_naming_rule.parameters_should_be_camel_case.style = camel_case
  61. dotnet_naming_rule.parameters_should_be_camel_case.symbols = parameters
  62. dotnet_naming_rule.private_and_internal_static_fields_should_be_pascal_case.severity = suggestion
  63. dotnet_naming_rule.private_and_internal_static_fields_should_be_pascal_case.style = pascal_case
  64. dotnet_naming_rule.private_and_internal_static_fields_should_be_pascal_case.symbols = private_and_internal_static_fields
  65. dotnet_naming_rule.private_and_internal_fields_should_be_camel_case_prefixed_with_underscore.severity = suggestion
  66. dotnet_naming_rule.private_and_internal_fields_should_be_camel_case_prefixed_with_underscore.style = camel_case_prefixed_with_underscore
  67. dotnet_naming_rule.private_and_internal_fields_should_be_camel_case_prefixed_with_underscore.symbols = private_and_internal_fields
  68. dotnet_naming_rule.public_and_protected_declarations_should_be_pascal_case.severity = suggestion
  69. dotnet_naming_rule.public_and_protected_declarations_should_be_pascal_case.style = pascal_case
  70. dotnet_naming_rule.public_and_protected_declarations_should_be_pascal_case.symbols = public_and_protected_declarations
  71. dotnet_naming_rule.static_readonly_declarations_should_be_pascal_case.severity = suggestion
  72. dotnet_naming_rule.static_readonly_declarations_should_be_pascal_case.style = pascal_case
  73. dotnet_naming_rule.static_readonly_declarations_should_be_pascal_case.symbols = static_readonly_declarations
  74. dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.severity = suggestion
  75. dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.style = pascal_case_prefixed_with_t
  76. dotnet_naming_rule.type_parameters_should_be_pascal_case_prefixed_with_t.symbols = type_parameters
  77. ###############################################################################
  78. # Set dotnet naming styles to define:
  79. # camel case
  80. # camel case prefixed with _
  81. # camel case prefixed with s_
  82. # pascal case
  83. # pascal case suffixed with Async
  84. # pascal case prefixed with I
  85. # pascal case prefixed with T
  86. ###############################################################################
  87. [*.cs]
  88. dotnet_naming_style.camel_case.capitalization = camel_case
  89. dotnet_naming_style.camel_case_prefixed_with_underscore.capitalization = camel_case
  90. dotnet_naming_style.camel_case_prefixed_with_underscore.required_prefix = _
  91. dotnet_naming_style.pascal_case.capitalization = pascal_case
  92. dotnet_naming_style.pascal_case_suffixed_with_async.capitalization = pascal_case
  93. dotnet_naming_style.pascal_case_suffixed_with_async.required_suffix = Async
  94. dotnet_naming_style.pascal_case_prefixed_with_i.capitalization = pascal_case
  95. dotnet_naming_style.pascal_case_prefixed_with_i.required_prefix = I
  96. dotnet_naming_style.pascal_case_prefixed_with_t.capitalization = pascal_case
  97. dotnet_naming_style.pascal_case_prefixed_with_t.required_prefix = T
  98. ###############################################################################
  99. # Set dotnet naming symbols to:
  100. # async members
  101. # const declarations
  102. # interfaces
  103. # private and internal fields
  104. # private and internal static fields
  105. # public and protected declarations
  106. # static readonly declarations
  107. # type parameters
  108. ###############################################################################
  109. [*.cs]
  110. dotnet_naming_symbols.async_members.required_modifiers = async
  111. dotnet_naming_symbols.const_declarations.required_modifiers = const
  112. dotnet_naming_symbols.interfaces.applicable_kinds = interface
  113. dotnet_naming_symbols.parameters.applicable_kinds = parameter
  114. dotnet_naming_symbols.private_and_internal_fields.applicable_accessibilities = private, internal
  115. dotnet_naming_symbols.private_and_internal_fields.applicable_kinds = field
  116. dotnet_naming_symbols.private_and_internal_static_fields.applicable_accessibilities = private, internal
  117. dotnet_naming_symbols.private_and_internal_static_fields.applicable_kinds = field
  118. dotnet_naming_symbols.private_and_internal_static_fields.required_modifiers = static
  119. dotnet_naming_symbols.public_and_protected_declarations.applicable_accessibilities = public, protected
  120. dotnet_naming_symbols.public_and_protected_declarations.applicable_kinds = namespace, class, struct, enum, property, method, field, event, delegate, local_function
  121. dotnet_naming_symbols.static_readonly_declarations.required_modifiers = static, readonly
  122. dotnet_naming_symbols.type_parameters.applicable_kinds = type_parameter
  123. ###############################################################################
  124. # Set dotnet sort options to:
  125. # do not separate import directives into groups, and
  126. # sort system directives first
  127. ###############################################################################
  128. [*.cs]
  129. dotnet_separate_import_directive_groups = false
  130. dotnet_sort_system_directives_first = true
  131. ###############################################################################
  132. # Set dotnet style options to:
  133. # suggest null-coalescing expressions,
  134. # suggest collection-initializers,
  135. # suggest explicit tuple names,
  136. # suggest null-propogation
  137. # suggest object-initializers,
  138. # suggest parentheses in arithmetic binary operators for clarity,
  139. # suggest parentheses in other binary operators for clarity,
  140. # don't suggest parentheses in other operators if unnecessary,
  141. # suggest parentheses in relational binary operators for clarity,
  142. # suggest predefined-types for locals, parameters, and members,
  143. # suggest predefined-types of type names for member access,
  144. # don't suggest auto properties,
  145. # suggest compound assignment,
  146. # suggest conditional expression over assignment,
  147. # suggest conditional expression over return,
  148. # suggest inferred anonymous types,
  149. # suggest inferred tuple names,
  150. # suggest 'is null' checks over '== null',
  151. # don't suggest 'this.' and 'Me.' for events,
  152. # don't suggest 'this.' and 'Me.' for fields,
  153. # don't suggest 'this.' and 'Me.' for methods,
  154. # don't suggest 'this.' and 'Me.' for properties,
  155. # suggest readonly fields, and
  156. # suggest specifying accessibility modifiers
  157. ###############################################################################
  158. [*.cs]
  159. dotnet_style_coalesce_expression = true:suggestion
  160. dotnet_style_collection_initializer = true:suggestion
  161. dotnet_style_explicit_tuple_names = true:suggestion
  162. dotnet_style_null_propagation = true:suggestion
  163. dotnet_style_object_initializer = true:suggestion
  164. dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
  165. dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
  166. dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
  167. dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
  168. dotnet_style_predefined_type_for_locals_parameters_members = true:suggestion
  169. dotnet_style_predefined_type_for_member_access = true:suggestion
  170. dotnet_style_prefer_auto_properties = false:suggestion
  171. dotnet_style_prefer_compound_assignment = true:suggestion
  172. dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
  173. dotnet_style_prefer_conditional_expression_over_return = true:suggestion
  174. dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
  175. dotnet_style_prefer_inferred_tuple_names = true:suggestion
  176. dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
  177. dotnet_style_qualification_for_event = false:suggestion
  178. dotnet_style_qualification_for_field = false:suggestion
  179. dotnet_style_qualification_for_method = false:suggestion
  180. dotnet_style_qualification_for_property = false:suggestion
  181. dotnet_style_readonly_field = true:suggestion
  182. dotnet_style_require_accessibility_modifiers = always:suggestion
  183. ###############################################################################
  184. # Set dotnet style options to:
  185. # suggest removing all unused parameters
  186. ###############################################################################
  187. [*.cs]
  188. dotnet_code_quality_unused_parameters = all:suggestion
  189. ###############################################################################
  190. # Set csharp indent options to:
  191. # indent block contents,
  192. # not indent braces,
  193. # indent case contents,
  194. # not indent case contents when block,
  195. # indent labels one less than the current, and
  196. # indent switch labels
  197. ###############################################################################
  198. [*.cs]
  199. csharp_indent_block_contents = true
  200. csharp_indent_braces = false
  201. csharp_indent_case_contents = true
  202. csharp_indent_case_contents_when_block = false
  203. csharp_indent_labels = one_less_than_current
  204. csharp_indent_switch_labels = true
  205. ###############################################################################
  206. # Set csharp new-line options to:
  207. # insert a new-line before "catch",
  208. # insert a new-line before "else",
  209. # insert a new-line before "finally",
  210. # insert a new-line before members in anonymous-types,
  211. # insert a new-line before members in object-initializers,
  212. # insert a new-line before all open braces except anonymous methods, anonymous types, lambdas, and object collections and
  213. # insert a new-line within query expression clauses
  214. ###############################################################################
  215. [*.cs]
  216. csharp_new_line_before_catch = true
  217. csharp_new_line_before_else = true
  218. csharp_new_line_before_finally = true
  219. csharp_new_line_before_members_in_anonymous_types = true
  220. csharp_new_line_before_members_in_object_initializers = true
  221. csharp_new_line_before_open_brace = accessors, control_blocks, events, indexers, local_functions, methods, object_collection_array_initializers, properties, types
  222. csharp_new_line_within_query_expression_clauses = true
  223. ###############################################################################
  224. # Set csharp preserve options to:
  225. # preserve single-line blocks, and
  226. # not preserve single-line statements
  227. ###############################################################################
  228. [*.cs]
  229. csharp_preserve_single_line_blocks = true
  230. csharp_preserve_single_line_statements = false
  231. ###############################################################################
  232. # Set csharp space options to:
  233. # remove any space after a cast,
  234. # add a space after the colon in an inheritance clause,
  235. # add a space after a comma,
  236. # remove any space after a dot,
  237. # add a space after keywords in control flow statements,
  238. # add a space after a semicolon in a "for" statement,
  239. # add a space before and after binary operators,
  240. # remove space around declaration statements,
  241. # add a space before the colon in an inheritance clause,
  242. # remove any space before a comma,
  243. # remove any space before a dot,
  244. # remove any space before an open square-bracket,
  245. # remove any space before a semicolon in a "for" statement,
  246. # remove any space between empty square-brackets,
  247. # remove any space between a method call's empty parameter list parenthesis,
  248. # remove any space between a method call's name and its opening parenthesis,
  249. # remove any space between a method call's parameter list parenthesis,
  250. # remove any space between a method declaration's empty parameter list parenthesis,
  251. # remove any space between a method declaration's name and its openening parenthesis,
  252. # remove any space between a method declaration's parameter list parenthesis,
  253. # remove any space between parentheses, and
  254. # remove any space between square brackets
  255. ###############################################################################
  256. [*.cs]
  257. csharp_space_after_cast = false
  258. csharp_space_after_colon_in_inheritance_clause = true
  259. csharp_space_after_comma = true
  260. csharp_space_after_dot = false
  261. csharp_space_after_keywords_in_control_flow_statements = true
  262. csharp_space_after_semicolon_in_for_statement = true
  263. csharp_space_around_binary_operators = before_and_after
  264. csharp_space_around_declaration_statements = do_not_ignore
  265. csharp_space_before_colon_in_inheritance_clause = true
  266. csharp_space_before_comma = false
  267. csharp_space_before_dot = false
  268. csharp_space_before_open_square_brackets = false
  269. csharp_space_before_semicolon_in_for_statement = false
  270. csharp_space_between_empty_square_brackets = false
  271. csharp_space_between_method_call_empty_parameter_list_parentheses = false
  272. csharp_space_between_method_call_name_and_opening_parenthesis = false
  273. csharp_space_between_method_call_parameter_list_parentheses = false
  274. csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
  275. csharp_space_between_method_declaration_name_and_open_parenthesis = false
  276. csharp_space_between_method_declaration_parameter_list_parentheses = false
  277. csharp_space_between_parentheses = false
  278. csharp_space_between_square_brackets = false
  279. ###############################################################################
  280. # Set csharp style options to:
  281. # don't suggest braces,
  282. # suggest simple default expressions,
  283. # suggest a preferred modifier order,
  284. # suggest conditional delegate calls,
  285. # suggest deconstructed variable declarations,
  286. # don't suggest expression-bodied accessors,
  287. # don't suggest expression-bodied indexers,
  288. # don't suggest expression-bodied constructors,
  289. # suggest expression-bodied lambdas,
  290. # don't suggest expression-bodied methods,
  291. # don't suggest expression-bodied operators,
  292. # don't suggest expression-bodied properties,
  293. # suggest inlined variable declarations,
  294. # suggest local over anonymous functions,
  295. # suggest pattern-matching over "as" with "null" check,
  296. # suggest pattern-matching over "is" with "cast" check,
  297. # suggest throw expressions,
  298. # suggest a discard variable for unused value expression statements,
  299. # suggest a discard variable for unused assignments,
  300. # suggest var for built-in types,
  301. # suggest var when the type is not apparent, and
  302. # suggest var when the type is apparent
  303. ###############################################################################
  304. [*.cs]
  305. csharp_prefer_braces = false:suggestion
  306. csharp_prefer_simple_default_expression = true:suggestion
  307. csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
  308. csharp_style_conditional_delegate_call = true:suggestion
  309. csharp_style_deconstructed_variable_declaration = true:suggestion
  310. csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
  311. csharp_style_expression_bodied_constructors = false:suggestion
  312. csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
  313. csharp_style_expression_bodied_lambdas = true:suggestion
  314. csharp_style_expression_bodied_methods = when_on_single_line:suggestion
  315. csharp_style_expression_bodied_operators = when_on_single_line:suggestion
  316. csharp_style_expression_bodied_properties = when_on_single_line:suggestion
  317. csharp_style_inlined_variable_declaration = true:suggestion
  318. csharp_style_pattern_local_over_anonymous_function = true:suggestion
  319. csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
  320. csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
  321. csharp_style_throw_expression = true:suggestion
  322. csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
  323. csharp_style_unused_value_assignment_preference = discard_variable:suggestion
  324. csharp_style_var_for_built_in_types = true:none
  325. csharp_style_var_elsewhere = true:suggestion
  326. csharp_style_var_when_type_is_apparent = true:suggestion

No Description