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 5.0 kB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  1. root = true
  2. # EditorConfig: http://EditorConfig.org
  3. # VS extension: https://marketplace.visualstudio.com/items?itemName = MadsKristensen.EditorConfig
  4. # 4 space indentation
  5. [*]
  6. charset = utf-8
  7. indent_style = space
  8. indent_size = 4
  9. # Microsoft .NET properties
  10. csharp_new_line_before_members_in_object_initializers = false
  11. csharp_preferred_modifier_order = public, private, protected, internal, new, abstract, virtual, sealed, override, static, readonly, extern, unsafe, volatile, async:suggestion
  12. csharp_style_expression_bodied_methods = true:suggestion
  13. csharp_style_var_elsewhere = true:suggestion
  14. csharp_style_var_for_built_in_types = true:suggestion
  15. csharp_style_var_when_type_is_apparent = true:suggestion
  16. dotnet_naming_rule.private_constants_rule.severity = suggestion
  17. dotnet_naming_rule.private_constants_rule.style = all_upper_style
  18. dotnet_naming_rule.private_constants_rule.symbols = private_constants_symbols
  19. dotnet_naming_rule.private_static_readonly_rule.severity = suggestion
  20. dotnet_naming_rule.private_static_readonly_rule.style = lower_camel_case_style
  21. dotnet_naming_rule.private_static_readonly_rule.symbols = private_static_readonly_symbols
  22. dotnet_naming_style.all_upper_style.capitalization = all_upper
  23. dotnet_naming_style.all_upper_style.word_separator = _
  24. dotnet_naming_style.lower_camel_case_style.capitalization = camel_case
  25. dotnet_naming_style.lower_camel_case_style.required_prefix = _
  26. dotnet_naming_symbols.private_constants_symbols.applicable_accessibilities = private
  27. dotnet_naming_symbols.private_constants_symbols.applicable_kinds = field
  28. dotnet_naming_symbols.private_constants_symbols.required_modifiers = const
  29. dotnet_naming_symbols.private_static_readonly_symbols.applicable_accessibilities = private
  30. dotnet_naming_symbols.private_static_readonly_symbols.applicable_kinds = field
  31. dotnet_naming_symbols.private_static_readonly_symbols.required_modifiers = static,readonly
  32. dotnet_style_parentheses_in_arithmetic_binary_operators = never_if_unnecessary:none
  33. dotnet_style_parentheses_in_other_binary_operators = never_if_unnecessary:none
  34. dotnet_style_parentheses_in_relational_binary_operators = never_if_unnecessary:none
  35. dotnet_style_qualification_for_event = false:warning
  36. dotnet_style_qualification_for_field = false:warning
  37. dotnet_style_qualification_for_method = false:warning
  38. dotnet_style_qualification_for_property = false:warning
  39. dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
  40. # CSharp code style settings:
  41. [*.cs]
  42. # Prefer "var" everywhere
  43. csharp_style_var_for_built_in_types = true:suggestion
  44. csharp_style_var_when_type_is_apparent = true:suggestion
  45. csharp_style_var_elsewhere = true:suggestion
  46. # Prefer method-like constructs to have a block body
  47. csharp_style_expression_bodied_methods = true:suggestion
  48. csharp_style_expression_bodied_constructors = false:none
  49. csharp_style_expression_bodied_operators = true:suggestion
  50. # Prefer property-like constructs to have an expression-body
  51. csharp_style_expression_bodied_properties = true:suggestion
  52. csharp_style_expression_bodied_indexers = true:suggestion
  53. csharp_style_expression_bodied_accessors = true:none
  54. # Suggest more modern language features when available
  55. csharp_style_pattern_matching_over_is_with_cast_check = false:none
  56. csharp_style_pattern_matching_over_as_with_null_check = false:none
  57. csharp_style_inlined_variable_declaration = false:none
  58. csharp_style_throw_expression = false:none
  59. csharp_style_conditional_delegate_call = true:suggestion
  60. # Newline settings
  61. csharp_new_line_before_open_brace = all
  62. csharp_new_line_before_else = true
  63. csharp_new_line_before_catch = true
  64. csharp_new_line_before_finally = true
  65. csharp_new_line_before_members_in_object_initializers = false
  66. csharp_new_line_before_members_in_anonymous_types = false
  67. # Dotnet code style settings:
  68. [*.{cs,vb}]
  69. # Sort using and Import directives with System.* appearing first
  70. dotnet_sort_system_directives_first = false
  71. # Avoid "this." and "Me." if not necessary
  72. dotnet_style_qualification_for_field = false:warning
  73. dotnet_style_qualification_for_property = false:warning
  74. dotnet_style_qualification_for_method = false:warning
  75. dotnet_style_qualification_for_event = false:warning
  76. # Use language keywords instead of framework type names for type references
  77. dotnet_style_predefined_type_for_locals_parameters_members = true:silent
  78. dotnet_style_predefined_type_for_member_access = true:silent
  79. # Suggest more modern language features when available
  80. dotnet_style_object_initializer = true:silent
  81. dotnet_style_collection_initializer = true:silent
  82. dotnet_style_coalesce_expression = true:suggestion
  83. dotnet_style_null_propagation = true:suggestion
  84. dotnet_style_explicit_tuple_names = true:suggestion
  85. [*.{appxmanifest,asax,ascx,aspx,axml,build,config,cs,cshtml,csproj,css,dbml,discomap,dtd,htm,html,js,json,jsproj,jsx,lsproj,master,njsproj,nuspec,proj,props,proto,razor,resjson,resw,resx,skin,StyleCop,targets,tasks,ts,tsx,vb,vbproj,xaml,xamlx,xml,xoml,xsd}]
  86. indent_style = space
  87. indent_size = 4
  88. tab_width = 4