.editorconfig (39734B)
1 # Remove the line below if you want to inherit .editorconfig settings from higher directories 2 root = true 3 4 # Don't use tabs for indentation. 5 [*] 6 indent_style = space 7 charset = utf-8 8 9 # XML project files 10 [*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}] 11 indent_size = 2 12 13 # XML config files 14 [*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}] 15 indent_size = 2 16 17 # JSON files 18 [*.json] 19 indent_size = 2 20 21 # Powershell files 22 [*.ps1] 23 indent_size = 2 24 25 # Shell script files 26 [*.sh] 27 end_of_line = lf 28 indent_size = 2 29 30 # Code files 31 [*.{cs,csx,vb,vbx}] 32 # Indentation and spacing 33 indent_size = 4 34 tab_width = 4 35 36 # New line preferences 37 end_of_line = lf 38 insert_final_newline = false 39 dotnet_style_allow_multiple_blank_lines_experimental = false:error 40 dotnet_style_allow_statement_immediately_after_block_experimental = true:error 41 42 #### .NET Coding Conventions #### 43 44 # Organize usings 45 dotnet_separate_import_directive_groups = false 46 dotnet_sort_system_directives_first = false 47 file_header_template = unset 48 49 # this. and Me. preferences 50 dotnet_style_qualification_for_event = false:error 51 dotnet_style_qualification_for_field = false:error 52 dotnet_style_qualification_for_method = false:error 53 dotnet_style_qualification_for_property = false:error 54 55 # Language keywords vs BCL types preferences 56 dotnet_style_predefined_type_for_locals_parameters_members = true:error 57 dotnet_style_predefined_type_for_member_access = true:error 58 59 # Parentheses preferences 60 dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:error 61 dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:error 62 dotnet_style_parentheses_in_other_operators = never_if_unnecessary:error 63 dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:error 64 65 # Modifier preferences 66 dotnet_style_require_accessibility_modifiers = omit_if_default:error 67 68 # Expression-level preferences 69 dotnet_style_coalesce_expression = true:error 70 dotnet_style_collection_initializer = true:error 71 dotnet_style_explicit_tuple_names = true:error 72 dotnet_style_null_propagation = true:error 73 dotnet_style_object_initializer = true:error 74 dotnet_style_operator_placement_when_wrapping = beginning_of_line 75 dotnet_style_prefer_auto_properties = true:error 76 dotnet_style_prefer_compound_assignment = true:error 77 dotnet_style_prefer_conditional_expression_over_assignment = true:error 78 dotnet_style_prefer_conditional_expression_over_return = true:error 79 dotnet_style_prefer_inferred_anonymous_type_member_names = true:error 80 dotnet_style_prefer_inferred_tuple_names = true:error 81 dotnet_style_prefer_is_null_check_over_reference_equality_method = true:error 82 dotnet_style_prefer_simplified_boolean_expressions = true:error 83 dotnet_style_prefer_simplified_interpolation = true:suggestion 84 85 # Field preferences 86 dotnet_style_readonly_field = true:error 87 88 # Parameter preferences 89 dotnet_code_quality_unused_parameters = all:error 90 91 # Suppression preferences 92 dotnet_remove_unnecessary_suppression_exclusions = error 93 94 #### C# Coding Conventions #### 95 96 # var preferences 97 csharp_style_var_elsewhere = true:error 98 csharp_style_var_for_built_in_types = true:error 99 csharp_style_var_when_type_is_apparent = true:error 100 101 # Expression-bodied members 102 csharp_style_expression_bodied_accessors = true:error 103 csharp_style_expression_bodied_constructors = true:error 104 csharp_style_expression_bodied_indexers = true:error 105 csharp_style_expression_bodied_lambdas = true:error 106 csharp_style_expression_bodied_local_functions = true:error 107 csharp_style_expression_bodied_methods = true:error 108 csharp_style_expression_bodied_operators = true:error 109 csharp_style_expression_bodied_properties = true:error 110 111 # Pattern matching preferences 112 csharp_style_pattern_matching_over_as_with_null_check = true:error 113 csharp_style_pattern_matching_over_is_with_cast_check = true:error 114 csharp_style_prefer_not_pattern = true:error 115 csharp_style_prefer_pattern_matching = true:error 116 csharp_style_prefer_switch_expression = true:error 117 118 # Null-checking preferences 119 csharp_style_conditional_delegate_call = true:error 120 121 # Modifier preferences 122 csharp_prefer_static_local_function = true:error 123 csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error 124 125 # Code-block preferences 126 csharp_prefer_braces = true:error 127 csharp_prefer_simple_using_statement = true:error 128 129 # Expression-level preferences 130 csharp_prefer_simple_default_expression = true:error 131 csharp_style_deconstructed_variable_declaration = true:error 132 csharp_style_inlined_variable_declaration = true:error 133 csharp_style_pattern_local_over_anonymous_function = true:error 134 csharp_style_prefer_index_operator = true:error 135 csharp_style_prefer_range_operator = true:error 136 csharp_style_throw_expression = true:error 137 csharp_style_unused_value_assignment_preference = unused_local_variable:error 138 csharp_style_unused_value_expression_statement_preference = unused_local_variable:error 139 140 # 'using' directive preferences 141 csharp_using_directive_placement = outside_namespace:error 142 143 #### C# Formatting Rules #### 144 145 # New line preferences 146 csharp_new_line_before_catch = false:error 147 csharp_new_line_before_else = false:error 148 csharp_new_line_before_finally = false:error 149 csharp_new_line_before_members_in_anonymous_types = true:error 150 csharp_new_line_before_members_in_object_initializers = true:error 151 csharp_new_line_before_open_brace = none:error 152 csharp_new_line_between_query_expression_clauses = true:error 153 154 # Indentation preferences 155 csharp_indent_block_contents = true:error 156 csharp_indent_braces = false:error 157 csharp_indent_case_contents = true:error 158 csharp_indent_case_contents_when_block = true:error 159 csharp_indent_labels = one_less_than_current:error 160 csharp_indent_switch_labels = true:error 161 162 # Space preferences 163 csharp_space_after_cast = false:error 164 csharp_space_after_colon_in_inheritance_clause = true:error 165 csharp_space_after_comma = true:error 166 csharp_space_after_dot = false:error 167 csharp_space_after_keywords_in_control_flow_statements = true:error 168 csharp_space_after_semicolon_in_for_statement = true:error 169 csharp_space_around_binary_operators = before_and_after:error 170 csharp_space_around_declaration_statements = false:error 171 csharp_space_before_colon_in_inheritance_clause = false:error 172 csharp_space_before_comma = false:error 173 csharp_space_before_dot = false:error 174 csharp_space_before_open_square_brackets = false:error 175 csharp_space_before_semicolon_in_for_statement = false:error 176 csharp_space_between_empty_square_brackets = false:error 177 csharp_space_between_method_call_empty_parameter_list_parentheses = false:error 178 csharp_space_between_method_call_name_and_opening_parenthesis = false:error 179 csharp_space_between_method_call_parameter_list_parentheses = false:error 180 csharp_space_between_method_declaration_empty_parameter_list_parentheses = false:error 181 csharp_space_between_method_declaration_name_and_open_parenthesis = false:error 182 csharp_space_between_method_declaration_parameter_list_parentheses = false:error 183 csharp_space_between_parentheses = false:error 184 csharp_space_between_square_brackets = false:error 185 186 # Wrapping preferences 187 csharp_preserve_single_line_blocks = true:error 188 csharp_preserve_single_line_statements = true:error 189 190 #### Naming styles #### 191 192 # Naming rules 193 194 dotnet_naming_rule.interface_should_be_begins_with_i.severity = error 195 dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface 196 dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i 197 198 dotnet_naming_rule.types_should_be_pascal_case.severity = error 199 dotnet_naming_rule.types_should_be_pascal_case.symbols = types 200 dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case 201 202 dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = error 203 dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members 204 dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case 205 206 # Symbol specifications 207 208 dotnet_naming_symbols.interface.applicable_kinds = interface 209 dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 210 dotnet_naming_symbols.interface.required_modifiers = 211 212 dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum 213 dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 214 dotnet_naming_symbols.types.required_modifiers = 215 216 dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method 217 dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected 218 dotnet_naming_symbols.non_field_members.required_modifiers = 219 220 # Naming styles 221 222 dotnet_naming_style.pascal_case.required_prefix = 223 dotnet_naming_style.pascal_case.required_suffix = 224 dotnet_naming_style.pascal_case.word_separator = 225 dotnet_naming_style.pascal_case.capitalization = pascal_case 226 227 dotnet_naming_style.begins_with_i.required_prefix = I 228 dotnet_naming_style.begins_with_i.required_suffix = 229 dotnet_naming_style.begins_with_i.word_separator = 230 dotnet_naming_style.begins_with_i.capitalization = pascal_case 231 232 ### Microsoft.CodeAnalysis.Analyzers Rules 233 234 # RS1001: Missing diagnostic analyzer attribute 235 dotnet_diagnostic.RS1001.severity = error 236 237 # RS1002: Missing kind argument when registering an analyzer action 238 dotnet_diagnostic.RS1002.severity = error 239 240 # RS1003: Unsupported SymbolKind argument when registering a symbol analyzer action 241 dotnet_diagnostic.RS1003.severity = error 242 243 # RS1004: Recommend adding language support to diagnostic analyzer 244 dotnet_diagnostic.RS1004.severity = error 245 246 # RS1005: ReportDiagnostic invoked with an unsupported DiagnosticDescriptor 247 dotnet_diagnostic.RS1005.severity = error 248 249 # RS1006: Invalid type argument for DiagnosticAnalyzer's Register method 250 dotnet_diagnostic.RS1006.severity = error 251 252 # RS1007: Provide localizable arguments to diagnostic descriptor constructor 253 dotnet_diagnostic.RS1007.severity = error 254 255 # RS1008: Avoid storing per-compilation data into the fields of a diagnostic analyzer 256 dotnet_diagnostic.RS1008.severity = error 257 258 # RS1009: Only internal implementations of this interface are allowed 259 dotnet_diagnostic.RS1009.severity = error 260 261 # RS1010: Create code actions should have a unique EquivalenceKey for FixAll occurrences support 262 dotnet_diagnostic.RS1010.severity = error 263 264 # RS1011: Use code actions that have a unique EquivalenceKey for FixAll occurrences support 265 dotnet_diagnostic.RS1011.severity = error 266 267 # RS1012: Start action has no registered actions 268 dotnet_diagnostic.RS1012.severity = error 269 270 # RS1013: Start action has no registered non-end actions 271 dotnet_diagnostic.RS1013.severity = error 272 273 # RS1014: Do not ignore values returned by methods on immutable objects. 274 dotnet_diagnostic.RS1014.severity = error 275 276 # RS1015: Provide non-null 'helpLinkUri' value to diagnostic descriptor constructor 277 dotnet_diagnostic.RS1015.severity = error 278 279 # RS1016: Code fix providers should provide FixAll support 280 dotnet_diagnostic.RS1016.severity = error 281 282 # RS1017: DiagnosticId for analyzers must be a non-null constant 283 dotnet_diagnostic.RS1017.severity = error 284 285 # RS1018: DiagnosticId for analyzers must be in specified format 286 dotnet_diagnostic.RS1018.severity = error 287 288 # RS1019: DiagnosticId must be unique across analyzers 289 dotnet_diagnostic.RS1019.severity = error 290 291 # RS1020: Category for analyzers must be from the specified values 292 dotnet_diagnostic.RS1020.severity = error 293 294 # RS1021: Invalid entry in analyzer category and diagnostic ID range specification file 295 dotnet_diagnostic.RS1021.severity = error 296 297 # RS1022: Do not use types from Workspaces assembly in an analyzer 298 dotnet_diagnostic.RS1022.severity = error 299 300 # RS1023: Upgrade MSBuildWorkspace 301 dotnet_diagnostic.RS1023.severity = error 302 303 # RS1024: Compare symbols correctly 304 dotnet_diagnostic.RS1024.severity = error 305 306 # RS1025: Configure generated code analysis 307 dotnet_diagnostic.RS1025.severity = error 308 309 # RS1026: Enable concurrent execution 310 dotnet_diagnostic.RS1026.severity = error 311 312 # RS1027: Types marked with DiagnosticAnalyzerAttribute(s) should inherit from DiagnosticAnalyzer 313 dotnet_diagnostic.RS1027.severity = error 314 315 # RS1028: Provide non-null 'customTags' value to diagnostic descriptor constructor 316 dotnet_diagnostic.RS1028.severity = error 317 318 # RS1029: Do not use reserved diagnostic IDs 319 dotnet_diagnostic.RS1029.severity = error 320 321 # RS1030: Do not invoke Compilation.GetSemanticModel() method within a diagnostic analyzer 322 dotnet_diagnostic.RS1030.severity = error 323 324 # RS1031: Define diagnostic title correctly 325 dotnet_diagnostic.RS1031.severity = error 326 327 # RS1032: Define diagnostic message correctly 328 dotnet_diagnostic.RS1032.severity = error 329 330 # RS1033: Define diagnostic description correctly 331 dotnet_diagnostic.RS1033.severity = error 332 333 # RS2000: Add analyzer diagnostic IDs to analyzer release. 334 dotnet_diagnostic.RS2000.severity = error 335 336 # RS2001: Ensure up-to-date entry for analyzer diagnostic IDs are added to analyzer release. 337 dotnet_diagnostic.RS2001.severity = error 338 339 # RS2002: Do not add removed analyzer diagnostic IDs to unshipped analyzer release. 340 dotnet_diagnostic.RS2002.severity = error 341 342 # RS2003: Shipped diagnostic IDs that are no longer reported should have an entry in the 'Removed Rules' table in unshipped file. 343 dotnet_diagnostic.RS2003.severity = error 344 345 # RS2004: Diagnostic IDs marked as removed in analyzer release file should not be reported by analyzers. 346 dotnet_diagnostic.RS2004.severity = error 347 348 # RS2005: Remove duplicate entries for diagnostic ID in the same analyzer release. 349 dotnet_diagnostic.RS2005.severity = error 350 351 # RS2006: Remove duplicate entries for diagnostic ID between analyzer releases. 352 dotnet_diagnostic.RS2006.severity = error 353 354 # RS2007: Invalid entry in analyzer release file. 355 dotnet_diagnostic.RS2007.severity = error 356 357 # RS2008: Enable analyzer release tracking 358 dotnet_diagnostic.RS2008.severity = error 359 360 ### Microsoft.CodeAnalysis.FxCopAnalyzers Rules 361 362 # CA1058: Types should not extend certain base types 363 dotnet_diagnostic.CA1058.severity = error 364 365 # CA2153: Do Not Catch Corrupted State Exceptions 366 dotnet_diagnostic.CA2153.severity = error 367 368 # CA3075: Insecure DTD processing in XML 369 dotnet_diagnostic.CA3075.severity = error 370 371 # CA3076: Insecure XSLT script processing. 372 dotnet_diagnostic.CA3076.severity = error 373 374 # CA3077: Insecure Processing in API Design, XmlDocument and XmlTextReader 375 dotnet_diagnostic.CA3077.severity = error 376 377 # CA3147: Mark Verb Handlers With Validate Antiforgery Token 378 dotnet_diagnostic.CA3147.severity = error 379 380 ### Microsoft.CodeAnalysis.VersionCheckAnalyzer Rules 381 382 # CA9999: Analyzer version mismatch 383 dotnet_diagnostic.CA9999.severity = error 384 385 ### Microsoft.CodeQuality.Analyzers Rules 386 387 # CA1000: Do not declare static members on generic types 388 dotnet_diagnostic.CA1000.severity = none 389 390 # CA1001: Types that own disposable fields should be disposable 391 dotnet_diagnostic.CA1001.severity = error 392 393 # CA1002: Do not expose generic lists 394 dotnet_diagnostic.CA1002.severity = error 395 396 # CA1003: Use generic event handler instances 397 dotnet_diagnostic.CA1003.severity = error 398 399 # CA1005: Avoid excessive parameters on generic types 400 dotnet_diagnostic.CA1005.severity = error 401 402 # CA1008: Enums should have zero value 403 dotnet_diagnostic.CA1008.severity = error 404 405 # CA1010: Generic interface should also be implemented 406 dotnet_diagnostic.CA1010.severity = error 407 408 # CA1012: Abstract types should not have public constructors 409 dotnet_diagnostic.CA1012.severity = error 410 411 # CA1014: Mark assemblies with CLSCompliant 412 dotnet_diagnostic.CA1014.severity = error 413 414 # CA1016: Mark assemblies with assembly version 415 dotnet_diagnostic.CA1016.severity = error 416 417 # CA1017: Mark assemblies with ComVisible 418 dotnet_diagnostic.CA1017.severity = error 419 420 # CA1018: Mark attributes with AttributeUsageAttribute 421 dotnet_diagnostic.CA1018.severity = error 422 423 # CA1019: Define accessors for attribute arguments 424 dotnet_diagnostic.CA1019.severity = error 425 426 # CA1021: Avoid out parameters 427 dotnet_diagnostic.CA1021.severity = none 428 429 # CA1024: Use properties where appropriate 430 dotnet_diagnostic.CA1024.severity = error 431 432 # CA1027: Mark enums with FlagsAttribute 433 dotnet_diagnostic.CA1027.severity = error 434 435 # CA1028: Enum Storage should be Int32 436 dotnet_diagnostic.CA1028.severity = none 437 438 # CA1030: Use events where appropriate 439 dotnet_diagnostic.CA1030.severity = error 440 441 # CA1031: Do not catch general exception types 442 dotnet_diagnostic.CA1031.severity = error 443 444 # CA1032: Implement standard exception constructors 445 dotnet_diagnostic.CA1032.severity = error 446 447 # CA1033: Interface methods should be callable by child types 448 dotnet_diagnostic.CA1033.severity = error 449 450 # CA1034: Nested types should not be visible 451 dotnet_diagnostic.CA1034.severity = none 452 453 # CA1036: Override methods on comparable types 454 dotnet_diagnostic.CA1036.severity = error 455 456 # CA1040: Avoid empty interfaces 457 dotnet_diagnostic.CA1040.severity = error 458 459 # CA1041: Provide ObsoleteAttribute message 460 dotnet_diagnostic.CA1041.severity = error 461 462 # CA1043: Use Integral Or String Argument For Indexers 463 dotnet_diagnostic.CA1043.severity = error 464 465 # CA1044: Properties should not be write only 466 dotnet_diagnostic.CA1044.severity = error 467 468 # CA1045: Do not pass types by reference 469 dotnet_diagnostic.CA1045.severity = none 470 471 # CA1046: Do not overload equality operator on reference types 472 dotnet_diagnostic.CA1046.severity = error 473 474 # CA1047: Do not declare protected member in sealed type 475 dotnet_diagnostic.CA1047.severity = error 476 477 # CA1050: Declare types in namespaces 478 dotnet_diagnostic.CA1050.severity = error 479 480 # CA1051: Do not declare visible instance fields 481 dotnet_diagnostic.CA1051.severity = none 482 483 # CA1052: Static holder types should be Static or NotInheritable 484 dotnet_diagnostic.CA1052.severity = error 485 486 # CA1054: URI-like parameters should not be strings 487 dotnet_diagnostic.CA1054.severity = error 488 489 # CA1055: URI-like return values should not be strings 490 dotnet_diagnostic.CA1055.severity = error 491 492 # CA1056: URI-like properties should not be strings 493 dotnet_diagnostic.CA1056.severity = error 494 495 # CA1060: Move pinvokes to native methods class 496 dotnet_diagnostic.CA1060.severity = error 497 498 # CA1061: Do not hide base class methods 499 dotnet_diagnostic.CA1061.severity = error 500 501 # CA1062: Validate arguments of public methods 502 dotnet_diagnostic.CA1062.severity = none 503 504 # CA1063: Implement IDisposable Correctly 505 dotnet_diagnostic.CA1063.severity = error 506 507 # CA1064: Exceptions should be public 508 dotnet_diagnostic.CA1064.severity = error 509 510 # CA1065: Do not raise exceptions in unexpected locations 511 dotnet_diagnostic.CA1065.severity = none 512 513 # CA1066: Implement IEquatable when overriding Object.Equals 514 dotnet_diagnostic.CA1066.severity = none 515 516 # CA1067: Override Object.Equals(object) when implementing IEquatable<T> 517 dotnet_diagnostic.CA1067.severity = error 518 519 # CA1068: CancellationToken parameters must come last 520 dotnet_diagnostic.CA1068.severity = error 521 522 # CA1069: Enums values should not be duplicated 523 dotnet_diagnostic.CA1069.severity = error 524 525 # CA1070: Do not declare event fields as virtual 526 dotnet_diagnostic.CA1070.severity = error 527 528 # CA1200: Avoid using cref tags with a prefix 529 dotnet_diagnostic.CA1200.severity = error 530 531 # CA1501: Avoid excessive inheritance 532 dotnet_diagnostic.CA1501.severity = error 533 534 # CA1502: Avoid excessive complexity 535 dotnet_diagnostic.CA1502.severity = error 536 537 # CA1505: Avoid unmaintainable code 538 dotnet_diagnostic.CA1505.severity = error 539 540 # CA1506: Avoid excessive class coupling 541 dotnet_diagnostic.CA1506.severity = error 542 543 # CA1507: Use nameof to express symbol names 544 dotnet_diagnostic.CA1507.severity = error 545 546 # CA1508: Avoid dead conditional code 547 dotnet_diagnostic.CA1508.severity = error 548 549 # CA1509: Invalid entry in code metrics rule specification file 550 dotnet_diagnostic.CA1509.severity = error 551 552 # CA1700: Do not name enum values 'Reserved' 553 dotnet_diagnostic.CA1700.severity = error 554 555 # CA1707: Identifiers should not contain underscores 556 dotnet_diagnostic.CA1707.severity = error 557 558 # CA1708: Identifiers should differ by more than case 559 dotnet_diagnostic.CA1708.severity = error 560 561 # CA1710: Identifiers should have correct suffix 562 dotnet_diagnostic.CA1710.severity = error 563 564 # CA1711: Identifiers should not have incorrect suffix 565 dotnet_diagnostic.CA1711.severity = error 566 567 # CA1712: Do not prefix enum values with type name 568 dotnet_diagnostic.CA1712.severity = error 569 570 # CA1713: Events should not have 'Before' or 'After' prefix 571 dotnet_diagnostic.CA1713.severity = error 572 573 # CA1714: Flags enums should have plural names 574 dotnet_diagnostic.CA1714.severity = error 575 576 # CA1715: Identifiers should have correct prefix 577 dotnet_diagnostic.CA1715.severity = error 578 579 # CA1716: Identifiers should not match keywords 580 dotnet_diagnostic.CA1716.severity = none 581 582 # CA1717: Only FlagsAttribute enums should have plural names 583 dotnet_diagnostic.CA1717.severity = error 584 585 # CA1720: Identifier contains type name 586 dotnet_diagnostic.CA1720.severity = none 587 588 # CA1721: Property names should not match get methods 589 dotnet_diagnostic.CA1721.severity = error 590 591 # CA1724: Type names should not match namespaces 592 dotnet_diagnostic.CA1724.severity = none 593 594 # CA1725: Parameter names should match base declaration 595 dotnet_diagnostic.CA1725.severity = none 596 597 # CA1801: Review unused parameters 598 dotnet_diagnostic.CA1801.severity = error 599 600 # CA1802: Use literals where appropriate 601 dotnet_diagnostic.CA1802.severity = error 602 603 # CA1805: Do not initialize unnecessarily 604 dotnet_diagnostic.CA1805.severity = none 605 606 # CA1806: Do not ignore method results 607 dotnet_diagnostic.CA1806.severity = error 608 609 # CA1812: Avoid uninstantiated internal classes 610 dotnet_diagnostic.CA1812.severity = error 611 612 # CA1814: Prefer jagged arrays over multidimensional 613 dotnet_diagnostic.CA1814.severity = error 614 615 # CA1815: Override equals and operator equals on value types 616 dotnet_diagnostic.CA1815.severity = none 617 618 # CA1819: Properties should not return arrays 619 dotnet_diagnostic.CA1819.severity = none 620 621 # CA1821: Remove empty Finalizers 622 dotnet_diagnostic.CA1821.severity = error 623 624 # CA1822: Mark members as static 625 dotnet_diagnostic.CA1822.severity = none 626 627 # CA1823: Avoid unused private fields 628 dotnet_diagnostic.CA1823.severity = error 629 630 # CA2007: Consider calling ConfigureAwait on the awaited task 631 dotnet_diagnostic.CA2007.severity = error 632 633 # CA2011: Avoid infinite recursion 634 dotnet_diagnostic.CA2011.severity = error 635 636 # CA2109: Review visible event handlers 637 dotnet_diagnostic.CA2109.severity = error 638 639 # CA2119: Seal methods that satisfy private interfaces 640 dotnet_diagnostic.CA2119.severity = error 641 642 # CA2200: Rethrow to preserve stack details 643 dotnet_diagnostic.CA2200.severity = error 644 645 # CA2211: Non-constant fields should not be visible 646 dotnet_diagnostic.CA2211.severity = error 647 648 # CA2214: Do not call overridable methods in constructors 649 dotnet_diagnostic.CA2214.severity = error 650 651 # CA2217: Do not mark enums with FlagsAttribute 652 dotnet_diagnostic.CA2217.severity = error 653 654 # CA2218: Override GetHashCode on overriding Equals 655 dotnet_diagnostic.CA2218.severity = error 656 657 # CA2219: Do not raise exceptions in finally clauses 658 dotnet_diagnostic.CA2219.severity = error 659 660 # CA2224: Override Equals on overloading operator equals 661 dotnet_diagnostic.CA2224.severity = error 662 663 # CA2225: Operator overloads have named alternates 664 dotnet_diagnostic.CA2225.severity = error 665 666 # CA2226: Operators should have symmetrical overloads 667 dotnet_diagnostic.CA2226.severity = error 668 669 # CA2227: Collection properties should be read only 670 dotnet_diagnostic.CA2227.severity = error 671 672 # CA2231: Overload operator equals on overriding value type Equals 673 dotnet_diagnostic.CA2231.severity = none 674 675 # CA2234: Pass system uri objects instead of strings 676 dotnet_diagnostic.CA2234.severity = error 677 678 # CA2244: Do not duplicate indexed element initializations 679 dotnet_diagnostic.CA2244.severity = error 680 681 # CA2245: Do not assign a property to itself 682 dotnet_diagnostic.CA2245.severity = error 683 684 # CA2246: Assigning symbol and its member in the same statement 685 dotnet_diagnostic.CA2246.severity = error 686 687 ### Microsoft.NetCore.Analyzers Rules 688 689 # CA1303: Do not pass literals as localized parameters 690 dotnet_diagnostic.CA1303.severity = error 691 692 # CA1304: Specify CultureInfo 693 dotnet_diagnostic.CA1304.severity = error 694 695 # CA1305: Specify IFormatProvider 696 dotnet_diagnostic.CA1305.severity = none 697 698 # CA1307: Specify StringComparison 699 dotnet_diagnostic.CA1307.severity = error 700 701 # CA1308: Normalize strings to uppercase 702 dotnet_diagnostic.CA1308.severity = error 703 704 # CA1309: Use ordinal stringcomparison 705 dotnet_diagnostic.CA1309.severity = error 706 707 # CA1401: P/Invokes should not be visible 708 dotnet_diagnostic.CA1401.severity = error 709 710 # CA1417: Do not use 'OutAttribute' on string parameters for P/Invokes 711 dotnet_diagnostic.CA1417.severity = error 712 713 # CA1810: Initialize reference type static fields inline 714 dotnet_diagnostic.CA1810.severity = error 715 716 # CA1813: Avoid unsealed attributes 717 dotnet_diagnostic.CA1813.severity = error 718 719 # CA1816: Dispose methods should call SuppressFinalize 720 dotnet_diagnostic.CA1816.severity = error 721 722 # CA1820: Test for empty strings using string length 723 dotnet_diagnostic.CA1820.severity = error 724 725 # CA1824: Mark assemblies with NeutralResourcesLanguageAttribute 726 dotnet_diagnostic.CA1824.severity = error 727 728 # CA1825: Avoid zero-length array allocations 729 dotnet_diagnostic.CA1825.severity = error 730 731 # CA1826: Do not use Enumerable methods on indexable collections 732 dotnet_diagnostic.CA1826.severity = error 733 734 # CA1827: Do not use Count() or LongCount() when Any() can be used 735 dotnet_diagnostic.CA1827.severity = error 736 737 # CA1828: Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used 738 dotnet_diagnostic.CA1828.severity = error 739 740 # CA1829: Use Length/Count property instead of Count() when available 741 dotnet_diagnostic.CA1829.severity = error 742 743 # CA1830: Prefer strongly-typed Append and Insert method overloads on StringBuilder 744 dotnet_diagnostic.CA1830.severity = error 745 746 # CA1831: Use AsSpan or AsMemory instead of Range-based indexers when appropriate 747 dotnet_diagnostic.CA1831.severity = error 748 749 # CA1832: Use AsSpan or AsMemory instead of Range-based indexers when appropriate 750 dotnet_diagnostic.CA1832.severity = error 751 752 # CA1833: Use AsSpan or AsMemory instead of Range-based indexers when appropriate 753 dotnet_diagnostic.CA1833.severity = error 754 755 # CA1834: Consider using 'StringBuilder.Append(char)' when applicable 756 dotnet_diagnostic.CA1834.severity = error 757 758 # CA1835: Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync' 759 dotnet_diagnostic.CA1835.severity = error 760 761 # CA1836: Prefer IsEmpty over Count 762 dotnet_diagnostic.CA1836.severity = error 763 764 # CA1837: Use 'Environment.ProcessId' 765 dotnet_diagnostic.CA1837.severity = error 766 767 # CA1838: Avoid 'StringBuilder' parameters for P/Invokes 768 dotnet_diagnostic.CA1838.severity = error 769 770 # CA2000: Dispose objects before losing scope 771 dotnet_diagnostic.CA2000.severity = error 772 773 # CA2002: Do not lock on objects with weak identity 774 dotnet_diagnostic.CA2002.severity = error 775 776 # CA2008: Do not create tasks without passing a TaskScheduler 777 dotnet_diagnostic.CA2008.severity = error 778 779 # CA2009: Do not call ToImmutableCollection on an ImmutableCollection value 780 dotnet_diagnostic.CA2009.severity = error 781 782 # CA2012: Use ValueTasks correctly 783 dotnet_diagnostic.CA2012.severity = error 784 785 # CA2013: Do not use ReferenceEquals with value types 786 dotnet_diagnostic.CA2013.severity = error 787 788 # CA2014: Do not use stackalloc in loops 789 dotnet_diagnostic.CA2014.severity = error 790 791 # CA2015: Do not define finalizers for types derived from MemoryManager<T> 792 dotnet_diagnostic.CA2015.severity = error 793 794 # CA2016: Forward the 'CancellationToken' parameter to methods that take one 795 dotnet_diagnostic.CA2016.severity = error 796 797 # CA2100: Review SQL queries for security vulnerabilities 798 dotnet_diagnostic.CA2100.severity = error 799 800 # CA2101: Specify marshaling for P/Invoke string arguments 801 dotnet_diagnostic.CA2101.severity = error 802 803 # CA2201: Do not raise reserved exception types 804 dotnet_diagnostic.CA2201.severity = error 805 806 # CA2207: Initialize value type static fields inline 807 dotnet_diagnostic.CA2207.severity = error 808 809 # CA2208: Instantiate argument exceptions correctly 810 dotnet_diagnostic.CA2208.severity = error 811 812 # CA2213: Disposable fields should be disposed 813 dotnet_diagnostic.CA2213.severity = error 814 815 # CA2215: Dispose methods should call base class dispose 816 dotnet_diagnostic.CA2215.severity = error 817 818 # CA2216: Disposable types should declare finalizer 819 dotnet_diagnostic.CA2216.severity = error 820 821 # CA2229: Implement serialization constructors 822 dotnet_diagnostic.CA2229.severity = error 823 824 # CA2235: Mark all non-serializable fields 825 dotnet_diagnostic.CA2235.severity = error 826 827 # CA2237: Mark ISerializable types with serializable 828 dotnet_diagnostic.CA2237.severity = error 829 830 # CA2241: Provide correct arguments to formatting methods 831 dotnet_diagnostic.CA2241.severity = error 832 833 # CA2242: Test for NaN correctly 834 dotnet_diagnostic.CA2242.severity = error 835 836 # CA2243: Attribute string literals should parse correctly 837 dotnet_diagnostic.CA2243.severity = error 838 839 # CA2247: Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum 840 dotnet_diagnostic.CA2247.severity = error 841 842 # CA2248: Provide correct 'enum' argument to 'Enum.HasFlag' 843 dotnet_diagnostic.CA2248.severity = error 844 845 # CA2249: Consider using 'string.Contains' instead of 'string.IndexOf' 846 dotnet_diagnostic.CA2249.severity = error 847 848 # CA2300: Do not use insecure deserializer BinaryFormatter 849 dotnet_diagnostic.CA2300.severity = error 850 851 # CA2301: Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder 852 dotnet_diagnostic.CA2301.severity = error 853 854 # CA2302: Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize 855 dotnet_diagnostic.CA2302.severity = error 856 857 # CA2305: Do not use insecure deserializer LosFormatter 858 dotnet_diagnostic.CA2305.severity = error 859 860 # CA2310: Do not use insecure deserializer NetDataContractSerializer 861 dotnet_diagnostic.CA2310.severity = error 862 863 # CA2311: Do not deserialize without first setting NetDataContractSerializer.Binder 864 dotnet_diagnostic.CA2311.severity = error 865 866 # CA2312: Ensure NetDataContractSerializer.Binder is set before deserializing 867 dotnet_diagnostic.CA2312.severity = error 868 869 # CA2315: Do not use insecure deserializer ObjectStateFormatter 870 dotnet_diagnostic.CA2315.severity = error 871 872 # CA2321: Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver 873 dotnet_diagnostic.CA2321.severity = error 874 875 # CA2322: Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing 876 dotnet_diagnostic.CA2322.severity = error 877 878 # CA2326: Do not use TypeNameHandling values other than None 879 dotnet_diagnostic.CA2326.severity = error 880 881 # CA2327: Do not use insecure JsonSerializerSettings 882 dotnet_diagnostic.CA2327.severity = error 883 884 # CA2328: Ensure that JsonSerializerSettings are secure 885 dotnet_diagnostic.CA2328.severity = error 886 887 # CA2329: Do not deserialize with JsonSerializer using an insecure configuration 888 dotnet_diagnostic.CA2329.severity = error 889 890 # CA2330: Ensure that JsonSerializer has a secure configuration when deserializing 891 dotnet_diagnostic.CA2330.severity = error 892 893 # CA2350: Do not use DataTable.ReadXml() with untrusted data 894 dotnet_diagnostic.CA2350.severity = error 895 896 # CA2351: Do not use DataSet.ReadXml() with untrusted data 897 dotnet_diagnostic.CA2351.severity = error 898 899 # CA2352: Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks 900 dotnet_diagnostic.CA2352.severity = error 901 902 # CA2353: Unsafe DataSet or DataTable in serializable type 903 dotnet_diagnostic.CA2353.severity = error 904 905 # CA2354: Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks 906 dotnet_diagnostic.CA2354.severity = error 907 908 # CA2355: Unsafe DataSet or DataTable type found in deserializable object graph 909 dotnet_diagnostic.CA2355.severity = error 910 911 # CA2356: Unsafe DataSet or DataTable type in web deserializable object graph 912 dotnet_diagnostic.CA2356.severity = error 913 914 # CA2361: Ensure autogenerated class containing DataSet.ReadXml() is not used with untrusted data 915 dotnet_diagnostic.CA2361.severity = error 916 917 # CA2362: Unsafe DataSet or DataTable in autogenerated serializable type can be vulnerable to remote code execution attacks 918 dotnet_diagnostic.CA2362.severity = error 919 920 # CA3001: Review code for SQL injection vulnerabilities 921 dotnet_diagnostic.CA3001.severity = error 922 923 # CA3002: Review code for XSS vulnerabilities 924 dotnet_diagnostic.CA3002.severity = error 925 926 # CA3003: Review code for file path injection vulnerabilities 927 dotnet_diagnostic.CA3003.severity = error 928 929 # CA3004: Review code for information disclosure vulnerabilities 930 dotnet_diagnostic.CA3004.severity = error 931 932 # CA3005: Review code for LDAP injection vulnerabilities 933 dotnet_diagnostic.CA3005.severity = error 934 935 # CA3006: Review code for process command injection vulnerabilities 936 dotnet_diagnostic.CA3006.severity = error 937 938 # CA3007: Review code for open redirect vulnerabilities 939 dotnet_diagnostic.CA3007.severity = error 940 941 # CA3008: Review code for XPath injection vulnerabilities 942 dotnet_diagnostic.CA3008.severity = error 943 944 # CA3009: Review code for XML injection vulnerabilities 945 dotnet_diagnostic.CA3009.severity = error 946 947 # CA3010: Review code for XAML injection vulnerabilities 948 dotnet_diagnostic.CA3010.severity = error 949 950 # CA3011: Review code for DLL injection vulnerabilities 951 dotnet_diagnostic.CA3011.severity = error 952 953 # CA3012: Review code for regex injection vulnerabilities 954 dotnet_diagnostic.CA3012.severity = error 955 956 # CA3061: Do Not Add Schema By URL 957 dotnet_diagnostic.CA3061.severity = error 958 959 # CA5350: Do Not Use Weak Cryptographic Algorithms 960 dotnet_diagnostic.CA5350.severity = error 961 962 # CA5351: Do Not Use Broken Cryptographic Algorithms 963 dotnet_diagnostic.CA5351.severity = error 964 965 # CA5358: Review cipher mode usage with cryptography experts 966 dotnet_diagnostic.CA5358.severity = error 967 968 # CA5359: Do Not Disable Certificate Validation 969 dotnet_diagnostic.CA5359.severity = error 970 971 # CA5360: Do Not Call Dangerous Methods In Deserialization 972 dotnet_diagnostic.CA5360.severity = error 973 974 # CA5361: Do Not Disable SChannel Use of Strong Crypto 975 dotnet_diagnostic.CA5361.severity = error 976 977 # CA5362: Potential reference cycle in deserialized object graph 978 dotnet_diagnostic.CA5362.severity = error 979 980 # CA5363: Do Not Disable Request Validation 981 dotnet_diagnostic.CA5363.severity = error 982 983 # CA5364: Do Not Use Deprecated Security Protocols 984 dotnet_diagnostic.CA5364.severity = error 985 986 # CA5365: Do Not Disable HTTP Header Checking 987 dotnet_diagnostic.CA5365.severity = error 988 989 # CA5366: Use XmlReader For DataSet Read Xml 990 dotnet_diagnostic.CA5366.severity = error 991 992 # CA5367: Do Not Serialize Types With Pointer Fields 993 dotnet_diagnostic.CA5367.severity = error 994 995 # CA5368: Set ViewStateUserKey For Classes Derived From Page 996 dotnet_diagnostic.CA5368.severity = error 997 998 # CA5369: Use XmlReader For Deserialize 999 dotnet_diagnostic.CA5369.severity = error 1000 1001 # CA5370: Use XmlReader For Validating Reader 1002 dotnet_diagnostic.CA5370.severity = error 1003 1004 # CA5371: Use XmlReader For Schema Read 1005 dotnet_diagnostic.CA5371.severity = error 1006 1007 # CA5372: Use XmlReader For XPathDocument 1008 dotnet_diagnostic.CA5372.severity = error 1009 1010 # CA5373: Do not use obsolete key derivation function 1011 dotnet_diagnostic.CA5373.severity = error 1012 1013 # CA5374: Do Not Use XslTransform 1014 dotnet_diagnostic.CA5374.severity = error 1015 1016 # CA5375: Do Not Use Account Shared Access Signature 1017 dotnet_diagnostic.CA5375.severity = error 1018 1019 # CA5376: Use SharedAccessProtocol HttpsOnly 1020 dotnet_diagnostic.CA5376.severity = error 1021 1022 # CA5377: Use Container Level Access Policy 1023 dotnet_diagnostic.CA5377.severity = error 1024 1025 # CA5378: Do not disable ServicePointManagerSecurityProtocols 1026 dotnet_diagnostic.CA5378.severity = error 1027 1028 # CA5379: Do Not Use Weak Key Derivation Function Algorithm 1029 dotnet_diagnostic.CA5379.severity = error 1030 1031 # CA5380: Do Not Add Certificates To Root Store 1032 dotnet_diagnostic.CA5380.severity = error 1033 1034 # CA5381: Ensure Certificates Are Not Added To Root Store 1035 dotnet_diagnostic.CA5381.severity = error 1036 1037 # CA5382: Use Secure Cookies In ASP.Net Core 1038 dotnet_diagnostic.CA5382.severity = error 1039 1040 # CA5383: Ensure Use Secure Cookies In ASP.Net Core 1041 dotnet_diagnostic.CA5383.severity = error 1042 1043 # CA5384: Do Not Use Digital Signature Algorithm (DSA) 1044 dotnet_diagnostic.CA5384.severity = error 1045 1046 # CA5385: Use Rivest–Shamir–Adleman (RSA) Algorithm With Sufficient Key Size 1047 dotnet_diagnostic.CA5385.severity = error 1048 1049 # CA5386: Avoid hardcoding SecurityProtocolType value 1050 dotnet_diagnostic.CA5386.severity = error 1051 1052 # CA5387: Do Not Use Weak Key Derivation Function With Insufficient Iteration Count 1053 dotnet_diagnostic.CA5387.severity = error 1054 1055 # CA5388: Ensure Sufficient Iteration Count When Using Weak Key Derivation Function 1056 dotnet_diagnostic.CA5388.severity = error 1057 1058 # CA5389: Do Not Add Archive Item's Path To The Target File System Path 1059 dotnet_diagnostic.CA5389.severity = error 1060 1061 # CA5390: Do not hard-code encryption key 1062 dotnet_diagnostic.CA5390.severity = error 1063 1064 # CA5391: Use antiforgery tokens in ASP.NET Core MVC controllers 1065 dotnet_diagnostic.CA5391.severity = error 1066 1067 # CA5392: Use DefaultDllImportSearchPaths attribute for P/Invokes 1068 dotnet_diagnostic.CA5392.severity = error 1069 1070 # CA5393: Do not use unsafe DllImportSearchPath value 1071 dotnet_diagnostic.CA5393.severity = error 1072 1073 # CA5394: Do not use insecure randomness 1074 dotnet_diagnostic.CA5394.severity = error 1075 1076 # CA5395: Miss HttpVerb attribute for action methods 1077 dotnet_diagnostic.CA5395.severity = error 1078 1079 # CA5396: Set HttpOnly to true for HttpCookie 1080 dotnet_diagnostic.CA5396.severity = error 1081 1082 # CA5397: Do not use deprecated SslProtocols values 1083 dotnet_diagnostic.CA5397.severity = error 1084 1085 # CA5398: Avoid hardcoded SslProtocols values 1086 dotnet_diagnostic.CA5398.severity = error 1087 1088 # CA5399: HttpClients should enable certificate revocation list checks 1089 dotnet_diagnostic.CA5399.severity = error 1090 1091 # CA5400: Ensure HttpClient certificate revocation list check is not disabled 1092 dotnet_diagnostic.CA5400.severity = error 1093 1094 # CA5401: Do not use CreateEncryptor with non-default IV 1095 dotnet_diagnostic.CA5401.severity = error 1096 1097 # CA5402: Use CreateEncryptor with the default IV 1098 dotnet_diagnostic.CA5402.severity = error 1099 1100 # CA5403: Do not hard-code certificate 1101 dotnet_diagnostic.CA5403.severity = error 1102 1103 # IL3000: Avoid using accessing Assembly file path when publishing as a single-file 1104 dotnet_diagnostic.IL3000.severity = error 1105 1106 # IL3001: Avoid using accessing Assembly file path when publishing as a single-file 1107 dotnet_diagnostic.IL3001.severity = error 1108 1109 # IDE0071: String interpolation can be simplified 1110 dotnet_diagnostic.IDE0071.severity = none 1111 1112 # IDE0064: Make readonly fields writable 1113 dotnet_diagnostic.IDE0064.severity = error