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.

116 lines
4.0 KiB

  1. ; Top-most EditorConfig file
  2. root = true
  3. [*]
  4. indent_style = tab
  5. indent_size = 4
  6. [*.il]
  7. indent_style = space
  8. indent_size = 2
  9. [*.csproj]
  10. indent_style = space
  11. indent_size = 2
  12. [*.config]
  13. indent_style = space
  14. indent_size = 2
  15. [*.nuspec]
  16. indent_style = space
  17. indent_size = 2
  18. [*.vsixmanifest]
  19. indent_style = space
  20. indent_size = 2
  21. [*.vsct]
  22. indent_style = space
  23. indent_size = 2
  24. [*.cs]
  25. # New line preferences
  26. csharp_new_line_before_open_brace = methods, types
  27. csharp_new_line_before_else = false
  28. csharp_new_line_before_catch = false
  29. csharp_new_line_before_finally = false
  30. csharp_new_line_before_members_in_object_initializers = false
  31. csharp_new_line_before_members_in_anonymous_types = false
  32. csharp_new_line_within_query_expression_clauses = false
  33. # Indentation preferences
  34. csharp_indent_block_contents = true
  35. csharp_indent_braces = false
  36. csharp_indent_case_contents = true
  37. csharp_indent_switch_labels = true
  38. csharp_indent_labels = one_less
  39. # Avoid 'this.' in generated code unless absolutely necessary, but allow developers to use it
  40. dotnet_style_qualification_for_field = false:silent
  41. dotnet_style_qualification_for_property = false:silent
  42. dotnet_style_qualification_for_method = false:silent
  43. dotnet_style_qualification_for_event = false:silent
  44. # Do not use 'var' when generating code, but allow developers to use it
  45. csharp_style_var_for_built_in_types = false:silent
  46. csharp_style_var_when_type_is_apparent = false:silent
  47. csharp_style_var_elsewhere = false:silent
  48. # Use language keywords instead of BCL types when generating code, but allow developers to use either
  49. dotnet_style_predefined_type_for_locals_parameters_members = true:silent
  50. dotnet_style_predefined_type_for_member_access = true:silent
  51. # Using directives
  52. dotnet_sort_system_directives_first = true
  53. # Wrapping
  54. csharp_preserve_single_line_blocks = true
  55. csharp_preserve_single_line_statements = true
  56. # Code style
  57. csharp_prefer_braces = true:silent
  58. # Expression-level preferences
  59. dotnet_style_object_initializer = true:suggestion
  60. dotnet_style_collection_initializer = true:suggestion
  61. dotnet_style_explicit_tuple_names = true:suggestion
  62. dotnet_style_coalesce_expression = true:suggestion
  63. dotnet_style_null_propagation = true:suggestion
  64. # Expression-bodied members
  65. csharp_style_expression_bodied_methods = false:silent
  66. csharp_style_expression_bodied_constructors = false:silent
  67. csharp_style_expression_bodied_operators = false:silent
  68. csharp_style_expression_bodied_properties = true:silent
  69. csharp_style_expression_bodied_indexers = true:silent
  70. csharp_style_expression_bodied_accessors = true:silent
  71. # Pattern matching
  72. csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
  73. csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
  74. csharp_style_inlined_variable_declaration = true:suggestion
  75. # Null checking preferences
  76. csharp_style_throw_expression = true:suggestion
  77. csharp_style_conditional_delegate_call = true:suggestion
  78. # Space preferences
  79. csharp_space_after_cast = false
  80. csharp_space_after_colon_in_inheritance_clause = true
  81. csharp_space_after_comma = true
  82. csharp_space_after_dot = false
  83. csharp_space_after_keywords_in_control_flow_statements = true
  84. csharp_space_after_semicolon_in_for_statement = true
  85. csharp_space_around_binary_operators = before_and_after
  86. csharp_space_around_declaration_statements = do_not_ignore
  87. csharp_space_before_colon_in_inheritance_clause = true
  88. csharp_space_before_comma = false
  89. csharp_space_before_dot = false
  90. csharp_space_before_open_square_brackets = false
  91. csharp_space_before_semicolon_in_for_statement = false
  92. csharp_space_between_empty_square_brackets = false
  93. csharp_space_between_method_call_empty_parameter_list_parentheses = false
  94. csharp_space_between_method_call_name_and_opening_parenthesis = false
  95. csharp_space_between_method_call_parameter_list_parentheses = false
  96. csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
  97. csharp_space_between_method_declaration_name_and_open_parenthesis = false
  98. csharp_space_between_method_declaration_parameter_list_parentheses = false
  99. csharp_space_between_parentheses = false
  100. csharp_space_between_square_brackets = false