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