.editorconfig 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463
  1. root = true
  2. ################################################################################
  3. ### All files
  4. ################################################################################
  5. [*]
  6. indent_style = space
  7. insert_final_newline = true
  8. trim_trailing_whitespace = true
  9. file_header_template = Copyright (c) Craftwork Games. All rights reserved.\nLicensed under the MIT license.\nSee LICENSE file in the project root for full license information.
  10. ################################################################################
  11. ### Xml files
  12. ################################################################################
  13. [*.xml]
  14. indent_size = 2
  15. ################################################################################
  16. ### Yaml files
  17. ################################################################################
  18. [*.yml]
  19. indent_size = 2
  20. ################################################################################
  21. ### C# files
  22. ################################################################################
  23. [*.cs]
  24. ################################################################################
  25. ###
  26. ###
  27. ### Core EditorConfig Options
  28. ###
  29. ###
  30. ################################################################################
  31. ################################################################################
  32. ### Indentation and spacing
  33. ################################################################################
  34. indent_size = 4
  35. tab_width = 4
  36. ################################################################################
  37. ### New line preferences
  38. ################################################################################
  39. end_of_line = lf
  40. ###############################################################################3
  41. ###
  42. ###
  43. ### .NET Coding Conventions
  44. ###
  45. ###
  46. ################################################################################
  47. [*.{cs,vb}]
  48. ################################################################################
  49. ### Organize usings
  50. ################################################################################
  51. dotnet_separate_import_directive_groups = false
  52. dotnet_sort_system_directives_first = true
  53. ################################################################################
  54. ### this. and Me. preferences
  55. ################################################################################
  56. dotnet_style_qualification_for_event = false:silent
  57. dotnet_style_qualification_for_field = false:silent
  58. dotnet_style_qualification_for_method = false:silent
  59. dotnet_style_qualification_for_property = false:silent
  60. ################################################################################
  61. ### Language keywords vs BCL types preferences
  62. ################################################################################
  63. dotnet_style_predefined_type_for_locals_parameters_members = true:silent
  64. dotnet_style_predefined_type_for_member_access = true:silent
  65. ################################################################################
  66. ### Parentheses preferences
  67. ################################################################################
  68. dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
  69. dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
  70. dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
  71. dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
  72. ################################################################################
  73. ### Modifier preferences
  74. ################################################################################
  75. dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
  76. ################################################################################
  77. ### Expression-level preferences
  78. ################################################################################
  79. dotnet_style_coalesce_expression = true:suggestion
  80. dotnet_style_collection_initializer = true:suggestion
  81. dotnet_style_explicit_tuple_names = true:suggestion
  82. dotnet_style_null_propagation = true:suggestion
  83. dotnet_style_object_initializer = true:suggestion
  84. dotnet_style_operator_placement_when_wrapping = beginning_of_line
  85. dotnet_style_prefer_auto_properties = true:suggestion
  86. dotnet_style_prefer_compound_assignment = true:suggestion
  87. dotnet_style_prefer_conditional_expression_over_assignment = true:suggestion
  88. dotnet_style_prefer_conditional_expression_over_return = true:suggestion
  89. dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
  90. dotnet_style_prefer_inferred_tuple_names = true:suggestion
  91. dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
  92. dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
  93. dotnet_style_prefer_simplified_interpolation = true:suggestion
  94. ################################################################################
  95. ### Field preferences
  96. ################################################################################
  97. dotnet_style_readonly_field = true:warning
  98. ################################################################################
  99. ### Parameter preferences
  100. ################################################################################
  101. dotnet_code_quality_unused_parameters = all:suggestion
  102. ################################################################################
  103. ### Suppression preferences
  104. ################################################################################
  105. dotnet_remove_unnecessary_suppression_exclusions = none
  106. ################################################################################
  107. ###
  108. ###
  109. ### C# Coding Conventions
  110. ###
  111. ###
  112. ################################################################################
  113. [*.cs]
  114. ################################################################################
  115. ### var preferences
  116. ################################################################################
  117. csharp_style_var_elsewhere = false:silent
  118. csharp_style_var_for_built_in_types = false:silent
  119. csharp_style_var_when_type_is_apparent = false:silent
  120. ################################################################################
  121. ### Expression-bodied members
  122. ################################################################################
  123. csharp_style_expression_bodied_accessors = true:silent
  124. csharp_style_expression_bodied_constructors = false:silent
  125. csharp_style_expression_bodied_indexers = true:silent
  126. csharp_style_expression_bodied_lambdas = true:suggestion
  127. csharp_style_expression_bodied_local_functions = false:silent
  128. csharp_style_expression_bodied_methods = false:silent
  129. csharp_style_expression_bodied_operators = false:silent
  130. csharp_style_expression_bodied_properties = true:silent
  131. ################################################################################
  132. ### Pattern matching preferences
  133. ################################################################################
  134. csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
  135. csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
  136. csharp_style_prefer_not_pattern = true:suggestion
  137. csharp_style_prefer_pattern_matching = true:silent
  138. csharp_style_prefer_switch_expression = true:suggestion
  139. ################################################################################
  140. ### Null-checking preferences
  141. ################################################################################
  142. csharp_style_conditional_delegate_call = true:suggestion
  143. ################################################################################
  144. ### Modifier preferences
  145. ################################################################################
  146. csharp_prefer_static_local_function = true:warning
  147. csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
  148. ################################################################################
  149. ### Code-block preferences
  150. ################################################################################
  151. csharp_prefer_braces = true:silent
  152. csharp_prefer_simple_using_statement = true:suggestion
  153. ################################################################################
  154. ### Expression-level preferences
  155. ################################################################################
  156. csharp_prefer_simple_default_expression = true:suggestion
  157. csharp_style_deconstructed_variable_declaration = true:suggestion
  158. csharp_style_inlined_variable_declaration = true:suggestion
  159. csharp_style_pattern_local_over_anonymous_function = true:suggestion
  160. csharp_style_prefer_index_operator = true:suggestion
  161. csharp_style_prefer_range_operator = true:suggestion
  162. csharp_style_throw_expression = true:suggestion
  163. csharp_style_unused_value_assignment_preference = discard_variable:suggestion
  164. csharp_style_unused_value_expression_statement_preference = discard_variable:silent
  165. ################################################################################
  166. ### 'using' directive preferences
  167. ################################################################################
  168. csharp_using_directive_placement = outside_namespace:silent
  169. ################################################################################
  170. ###
  171. ###
  172. ### C# Formatting Rules
  173. ###
  174. ###
  175. ################################################################################
  176. ################################################################################
  177. ### New line preferences
  178. ################################################################################
  179. csharp_new_line_before_catch = true
  180. csharp_new_line_before_else = true
  181. csharp_new_line_before_finally = true
  182. csharp_new_line_before_members_in_anonymous_types = true
  183. csharp_new_line_before_members_in_object_initializers = true
  184. csharp_new_line_before_open_brace = all
  185. csharp_new_line_between_query_expression_clauses = true
  186. ################################################################################
  187. ### Indentation preferences
  188. ################################################################################
  189. csharp_indent_block_contents = true
  190. csharp_indent_braces = false
  191. csharp_indent_case_contents = true
  192. csharp_indent_case_contents_when_block = true
  193. csharp_indent_labels = one_less_than_current
  194. csharp_indent_switch_labels = true
  195. ################################################################################
  196. ### Space preferences
  197. ################################################################################
  198. csharp_space_after_cast = false
  199. csharp_space_after_colon_in_inheritance_clause = true
  200. csharp_space_after_comma = true
  201. csharp_space_after_dot = false
  202. csharp_space_after_keywords_in_control_flow_statements = true
  203. csharp_space_after_semicolon_in_for_statement = true
  204. csharp_space_around_binary_operators = before_and_after
  205. csharp_space_around_declaration_statements = false
  206. csharp_space_before_colon_in_inheritance_clause = true
  207. csharp_space_before_comma = false
  208. csharp_space_before_dot = false
  209. csharp_space_before_open_square_brackets = false
  210. csharp_space_before_semicolon_in_for_statement = false
  211. csharp_space_between_empty_square_brackets = false
  212. csharp_space_between_method_call_empty_parameter_list_parentheses = false
  213. csharp_space_between_method_call_name_and_opening_parenthesis = false
  214. csharp_space_between_method_call_parameter_list_parentheses = false
  215. csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
  216. csharp_space_between_method_declaration_name_and_open_parenthesis = false
  217. csharp_space_between_method_declaration_parameter_list_parentheses = false
  218. csharp_space_between_parentheses = false
  219. csharp_space_between_square_brackets = false
  220. ################################################################################
  221. ### Wrapping preferences
  222. ################################################################################
  223. csharp_preserve_single_line_blocks = true
  224. csharp_preserve_single_line_statements = true
  225. ################################################################################
  226. ###
  227. ###
  228. ### Naming styles
  229. ###
  230. ###
  231. ################################################################################
  232. [*.{cs,vb}]
  233. ################################################################################
  234. ### Naming rules
  235. ################################################################################
  236. dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = suggestion
  237. dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces
  238. dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase
  239. dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = suggestion
  240. dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces
  241. dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase
  242. dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = suggestion
  243. dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters
  244. dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase
  245. dotnet_naming_rule.methods_should_be_pascalcase.severity = suggestion
  246. dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods
  247. dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase
  248. dotnet_naming_rule.properties_should_be_pascalcase.severity = suggestion
  249. dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties
  250. dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase
  251. dotnet_naming_rule.events_should_be_pascalcase.severity = suggestion
  252. dotnet_naming_rule.events_should_be_pascalcase.symbols = events
  253. dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase
  254. dotnet_naming_rule.local_variables_should_be_camelcase.severity = suggestion
  255. dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables
  256. dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase
  257. dotnet_naming_rule.local_constants_should_be_camelcase.severity = suggestion
  258. dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants
  259. dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase
  260. dotnet_naming_rule.parameters_should_be_camelcase.severity = suggestion
  261. dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters
  262. dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase
  263. dotnet_naming_rule.public_fields_should_be_pascalcase.severity = suggestion
  264. dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields
  265. dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase
  266. dotnet_naming_rule.private_fields_should_be__camelcase.severity = suggestion
  267. dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields
  268. dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase
  269. dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = suggestion
  270. dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields
  271. dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase
  272. dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = suggestion
  273. dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields
  274. dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase
  275. dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = suggestion
  276. dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields
  277. dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase
  278. dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = suggestion
  279. dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields
  280. dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase
  281. dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = suggestion
  282. dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields
  283. dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase
  284. dotnet_naming_rule.enums_should_be_pascalcase.severity = suggestion
  285. dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums
  286. dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase
  287. dotnet_naming_rule.local_functions_should_be_pascalcase.severity = suggestion
  288. dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions
  289. dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase
  290. dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion
  291. dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members
  292. dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
  293. ################################################################################
  294. ### Symbol specifications
  295. ################################################################################
  296. dotnet_naming_symbols.interfaces.applicable_kinds = interface
  297. dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  298. dotnet_naming_symbols.interfaces.required_modifiers =
  299. dotnet_naming_symbols.enums.applicable_kinds = enum
  300. dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  301. dotnet_naming_symbols.enums.required_modifiers =
  302. dotnet_naming_symbols.events.applicable_kinds = event
  303. dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  304. dotnet_naming_symbols.events.required_modifiers =
  305. dotnet_naming_symbols.methods.applicable_kinds = method
  306. dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  307. dotnet_naming_symbols.methods.required_modifiers =
  308. dotnet_naming_symbols.properties.applicable_kinds = property
  309. dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  310. dotnet_naming_symbols.properties.required_modifiers =
  311. dotnet_naming_symbols.public_fields.applicable_kinds = field
  312. dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
  313. dotnet_naming_symbols.public_fields.required_modifiers =
  314. dotnet_naming_symbols.private_fields.applicable_kinds = field
  315. dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
  316. dotnet_naming_symbols.private_fields.required_modifiers =
  317. dotnet_naming_symbols.private_static_fields.applicable_kinds = field
  318. dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
  319. dotnet_naming_symbols.private_static_fields.required_modifiers = static
  320. dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
  321. dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  322. dotnet_naming_symbols.types_and_namespaces.required_modifiers =
  323. dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
  324. dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  325. dotnet_naming_symbols.non_field_members.required_modifiers =
  326. dotnet_naming_symbols.type_parameters.applicable_kinds = namespace
  327. dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
  328. dotnet_naming_symbols.type_parameters.required_modifiers =
  329. dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
  330. dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
  331. dotnet_naming_symbols.private_constant_fields.required_modifiers = const
  332. dotnet_naming_symbols.local_variables.applicable_kinds = local
  333. dotnet_naming_symbols.local_variables.applicable_accessibilities = local
  334. dotnet_naming_symbols.local_variables.required_modifiers =
  335. dotnet_naming_symbols.local_constants.applicable_kinds = local
  336. dotnet_naming_symbols.local_constants.applicable_accessibilities = local
  337. dotnet_naming_symbols.local_constants.required_modifiers = const
  338. dotnet_naming_symbols.parameters.applicable_kinds = parameter
  339. dotnet_naming_symbols.parameters.applicable_accessibilities = *
  340. dotnet_naming_symbols.parameters.required_modifiers =
  341. dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
  342. dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
  343. dotnet_naming_symbols.public_constant_fields.required_modifiers = const
  344. dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field
  345. dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal
  346. dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static
  347. dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field
  348. dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
  349. dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static
  350. dotnet_naming_symbols.local_functions.applicable_kinds = local_function
  351. dotnet_naming_symbols.local_functions.applicable_accessibilities = *
  352. dotnet_naming_symbols.local_functions.required_modifiers =
  353. ################################################################################
  354. ### Naming styles
  355. ################################################################################
  356. dotnet_naming_style.pascalcase.required_prefix =
  357. dotnet_naming_style.pascalcase.required_suffix =
  358. dotnet_naming_style.pascalcase.word_separator =
  359. dotnet_naming_style.pascalcase.capitalization = pascal_case
  360. dotnet_naming_style.ipascalcase.required_prefix = I
  361. dotnet_naming_style.ipascalcase.required_suffix =
  362. dotnet_naming_style.ipascalcase.word_separator =
  363. dotnet_naming_style.ipascalcase.capitalization = pascal_case
  364. dotnet_naming_style.tpascalcase.required_prefix = T
  365. dotnet_naming_style.tpascalcase.required_suffix =
  366. dotnet_naming_style.tpascalcase.word_separator =
  367. dotnet_naming_style.tpascalcase.capitalization = pascal_case
  368. dotnet_naming_style._camelcase.required_prefix = _
  369. dotnet_naming_style._camelcase.required_suffix =
  370. dotnet_naming_style._camelcase.word_separator =
  371. dotnet_naming_style._camelcase.capitalization = camel_case
  372. dotnet_naming_style.camelcase.required_prefix =
  373. dotnet_naming_style.camelcase.required_suffix =
  374. dotnet_naming_style.camelcase.word_separator =
  375. dotnet_naming_style.camelcase.capitalization = camel_case
  376. dotnet_naming_style.s_camelcase.required_prefix = s_
  377. dotnet_naming_style.s_camelcase.required_suffix =
  378. dotnet_naming_style.s_camelcase.word_separator =
  379. dotnet_naming_style.s_camelcase.capitalization = camel_case
  380. ################################################################################
  381. ###
  382. ### Warning Supressions
  383. ###
  384. ################################################################################
  385. [*.{cs,vb}]