.editorconfig 7.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. [*.cs]
  2. # CA1051: Do not declare visible instance fields
  3. dotnet_diagnostic.CA1051.severity = silent
  4. # CA1715: Identifiers should have correct prefix
  5. dotnet_diagnostic.CA1715.severity = silent
  6. csharp_using_directive_placement = outside_namespace:silent
  7. csharp_prefer_simple_using_statement = true:suggestion
  8. csharp_prefer_braces = true:silent
  9. csharp_style_namespace_declarations = block_scoped:silent
  10. csharp_style_expression_bodied_methods = false:silent
  11. csharp_style_expression_bodied_constructors = false:silent
  12. csharp_style_expression_bodied_operators = false:silent
  13. csharp_style_expression_bodied_properties = true:silent
  14. csharp_indent_labels = one_less_than_current
  15. csharp_style_expression_bodied_indexers = true:silent
  16. csharp_style_expression_bodied_accessors = true:silent
  17. csharp_style_expression_bodied_lambdas = true:silent
  18. csharp_style_expression_bodied_local_functions = false:silent
  19. csharp_prefer_static_local_function = true:suggestion
  20. csharp_style_allow_embedded_statements_on_same_line_experimental = true:silent
  21. csharp_style_allow_blank_lines_between_consecutive_braces_experimental = true:silent
  22. csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = true:silent
  23. csharp_style_conditional_delegate_call = true:suggestion
  24. csharp_style_prefer_switch_expression = true:suggestion
  25. csharp_style_prefer_pattern_matching = true:silent
  26. csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
  27. csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
  28. csharp_style_prefer_not_pattern = true:suggestion
  29. csharp_style_prefer_extended_property_pattern = true:suggestion
  30. csharp_style_var_for_built_in_types = false:silent
  31. csharp_style_var_when_type_is_apparent = false:silent
  32. csharp_style_var_elsewhere = false:silent
  33. # SA1623: Property summary documentation should match accessors
  34. dotnet_diagnostic.SA1623.severity = silent
  35. # CA1032: Implement standard exception constructors
  36. dotnet_diagnostic.CA1032.severity = silent
  37. # CA1034: Nested types should not be visible
  38. dotnet_diagnostic.CA1034.severity = silent
  39. # CA1721: Property names should not match get methods
  40. dotnet_diagnostic.CA1721.severity = silent
  41. # CA1024: Use properties where appropriate
  42. dotnet_diagnostic.CA1024.severity = silent
  43. # CA2225: Operator overloads have named alternates
  44. dotnet_diagnostic.CA2225.severity = silent
  45. # CA1707: Identifiers should not contain underscores
  46. dotnet_diagnostic.CA1707.severity = silent
  47. # CA1815: Override equals and operator equals on value types
  48. dotnet_diagnostic.CA1815.severity = silent
  49. # IL2026: Using dynamic types might cause types or members to be removed by trimmer.
  50. dotnet_diagnostic.IL2026.severity = error
  51. csharp_style_throw_expression = true:suggestion
  52. dotnet_diagnostic.IL2046.severity = error
  53. dotnet_diagnostic.IL2109.severity = error
  54. [*.{cs,vb}]
  55. #### Naming styles ####
  56. # Naming rules
  57. dotnet_naming_rule.interface_should_be_begins_with_i.severity = suggestion
  58. dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
  59. dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
  60. dotnet_naming_rule.types_should_be_pascal_case.severity = suggestion
  61. dotnet_naming_rule.types_should_be_pascal_case.symbols = types
  62. dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
  63. dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = suggestion
  64. dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
  65. dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case
  66. # Symbol specifications
  67. dotnet_naming_symbols.interface.applicable_kinds = interface
  68. dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  69. dotnet_naming_symbols.interface.required_modifiers =
  70. dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
  71. dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  72. dotnet_naming_symbols.types.required_modifiers =
  73. dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
  74. dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
  75. dotnet_naming_symbols.non_field_members.required_modifiers =
  76. # Naming styles
  77. dotnet_naming_style.begins_with_i.required_prefix = I
  78. dotnet_naming_style.begins_with_i.required_suffix =
  79. dotnet_naming_style.begins_with_i.word_separator =
  80. dotnet_naming_style.begins_with_i.capitalization = pascal_case
  81. dotnet_naming_style.pascal_case.required_prefix =
  82. dotnet_naming_style.pascal_case.required_suffix =
  83. dotnet_naming_style.pascal_case.word_separator =
  84. dotnet_naming_style.pascal_case.capitalization = pascal_case
  85. dotnet_naming_style.pascal_case.required_prefix =
  86. dotnet_naming_style.pascal_case.required_suffix =
  87. dotnet_naming_style.pascal_case.word_separator =
  88. dotnet_naming_style.pascal_case.capitalization = pascal_case
  89. dotnet_style_operator_placement_when_wrapping = beginning_of_line
  90. tab_width = 4
  91. indent_size = 4
  92. end_of_line = crlf
  93. dotnet_style_coalesce_expression = true:suggestion
  94. dotnet_style_null_propagation = true:suggestion
  95. dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
  96. dotnet_style_prefer_auto_properties = true:silent
  97. dotnet_style_object_initializer = true:suggestion
  98. dotnet_style_collection_initializer = true:suggestion
  99. dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
  100. dotnet_style_prefer_conditional_expression_over_assignment = true:silent
  101. dotnet_style_prefer_conditional_expression_over_return = true:silent
  102. dotnet_style_explicit_tuple_names = true:suggestion
  103. dotnet_style_prefer_inferred_tuple_names = true:suggestion
  104. dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
  105. dotnet_style_prefer_compound_assignment = true:suggestion
  106. dotnet_style_prefer_simplified_interpolation = true:suggestion
  107. dotnet_style_readonly_field = true:suggestion
  108. dotnet_style_predefined_type_for_locals_parameters_members = true:silent
  109. dotnet_style_predefined_type_for_member_access = true:silent
  110. dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
  111. dotnet_style_allow_multiple_blank_lines_experimental = true:silent
  112. dotnet_style_allow_statement_immediately_after_block_experimental = true:silent
  113. dotnet_code_quality_unused_parameters = all:suggestion
  114. dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
  115. dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
  116. dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
  117. dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
  118. dotnet_style_qualification_for_field = false:silent
  119. dotnet_style_qualification_for_property = false:silent
  120. dotnet_style_qualification_for_method = false:silent
  121. dotnet_style_qualification_for_event = false:silent
  122. # CA1014: Mark assemblies with CLSCompliant
  123. dotnet_diagnostic.CA1014.severity = silent
  124. dotnet_style_namespace_match_folder = true:suggestion