Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An opinionated C# .editorconfig

License

NotificationsYou must be signed in to change notification settings

dimitrietataru/csharp-coding-standards

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 

Repository files navigation

An opinionated C# .editorconfig
Compatible with Visual Studio 2022, and 2019*.

Table of contents

Visual Studio options

Advanced | Using directives

Description _________________________________________________________________________Value
PlaceSystem directives first when sorting usings
Separate using directive groups
.editorconfig
dotnet_sort_system_directives_first =falsedotnet_separate_import_directive_groups =false

Code Style | General |this. preferences

Description _______________________________________________CodePreference ____________!! Severity !!
Qualify field access withthis.IDE0003Do not preferthis⚠ Warning
Qualify property access withthis.IDE0003Do not preferthis⚠ Warning
Qualify method access withthis.IDE0003Do not preferthis⚠ Warning
Qualify event access withthis.IDE0003Do not preferthis⚠ Warning
.editorconfig
dotnet_style_qualification_for_event =false:warningdotnet_style_qualification_for_field =false:warningdotnet_style_qualification_for_method =false:warningdotnet_style_qualification_for_property =false:warning

Code Style | General | Predefined type preferences

Description _______________________________________________CodePreference ____________!! Severity !!
For locals, parameters, and membersIDE0049Prefer predefined type⚠ Warning
For member access expressionsIDE0049Prefer predefined type⚠ Warning
.editorconfig
dotnet_style_predefined_type_for_locals_parameters_members =true:warningdotnet_style_predefined_type_for_member_access =true:warning

Code Style | General |var preferences

Description _______________________________________________CodePreference ____________!! Severity !!
For built-in typesIDE0008Prefer explicit type🛈 Suggestion
When variable type is apparentIDE0007Prefervar⚠ Warning
ElsewhereIDE0007Prefervar🛈 Suggestion
.editorconfig
csharp_style_var_for_built_in_types =false:suggestioncsharp_style_var_when_type_is_apparent =true:warningcsharp_style_var_elsewhere =true:suggestion

Code Style | General | Code block preferences

Description _______________________________________________CodePreference ____________!! Severity !!
Prefer bracesIDE0011Yes⚠ Warning
Prefer auto propertiesIDE0032Yes🞅 Refactoring
Prefer simpleusing statementIDE0063Yes🛈 Suggestion
PreferSystem.HashCode in 'GetHashCode'IDE0070Yes🛈 Suggestion
Namespace declarationsIDE0161File scoped🛈 Suggestion
Prefer method group conversionIDE0200Yes🛈 Suggestion
Prefer top-level statementsIDE0210Yes🛈 Suggestion
Prefer primary constructorsIDE0290No⚠ Warning
.editorconfig
csharp_prefer_braces =true:warningdotnet_style_prefer_auto_properties =true:silentcsharp_prefer_simple_using_statement =true:suggestion# Missing: Prefer _System.HashCode_ in 'GetHashCode'csharp_style_namespace_declarations =file_scoped:suggestioncsharp_style_prefer_method_group_conversion =true:suggestioncsharp_style_prefer_top_level_statements =true:suggestioncsharp_style_prefer_primary_constructors =false:warning

Code Style | General | Parentheses preferences

Description _______________________________________________CodePreference ____________!! Severity !!
In arithmetic operators:*/%+-<<>>&^IDE0048Always for clarity🛈 Suggestion
In other binary operators:&&??andorIDE0048Always for clarity🛈 Suggestion
In relational operators:<><=>=isas==!=IDE0048Always for clarity🛈 Suggestion
In other operatorsIDE0047Never if unnecessary⚠ Warning
.editorconfig
dotnet_style_parentheses_in_arithmetic_binary_operators =always_for_clarity:suggestiondotnet_style_parentheses_in_relational_binary_operators =always_for_clarity:suggestiondotnet_style_parentheses_in_other_binary_operators =always_for_clarity:suggestiondotnet_style_parentheses_in_other_operators =never_if_unnecessary:warning

Code Style | General | Expression preferences

Description _______________________________________________CodePreference ____________!! Severity !!
Prefer object initializerIDE0017Yes🛈 Suggestion
Prefer collection initializerIDE0028Yes🛈 Suggestion
Prefer explicit tuple nameIDE0033Yes🛈 Suggestion
Prefer simpledefault expressionIDE0034Yes⚠ Warning
Prefer inferred tuple element namesIDE0037No🛈 Suggestion
Prefer inferred anonymous type member namesIDE0037Yes🞅 Refactoring
Prefer local function over anonymous functionIDE0039Yes⚠ Warning
Prefer conditional expression overif with assignmentsIDE0045Yes🞅 Refactoring
Prefer conditional expression overif with returnsIDE0046No🞅 Refactoring
Prefer compound assignmentsIDE0054Yes⚠ Warning
Prefer index operatorIDE0056Yes🛈 Suggestion
Prefer range operatorIDE0057Yes🛈 Suggestion
Avoid expression statements that implicitly ignore valueIDE0058Discard🞅 Refactoring
Avoid unused value assignmentsIDE0059Discard🞅 Refactoring
Prefer switch expressionIDE0066Yes🛈 Suggestion
Prefer simplified interpolationIDE0071Yes⚠ Warning
Prefer simplified boolean expressionsIDE0075Yes⚠ Warning
Prefer implicit object creation when type is aparentIDE0090Yes🛈 Suggestion
Prefer namespace and folder match structureIDE0130Yes🛈 Suggestion
Prefer tuple swapIDE0180Yes🛈 Suggestion
Prefer UTF-8 string literalsIDE0230Yes🛈 Suggestion
Prefer collection expressionIDE0300Yes🛈 Suggestion
Operator placement when wrappingBeginning of line
.editorconfig
dotnet_style_object_initializer =true:suggestiondotnet_style_collection_initializer =true:suggestiondotnet_style_explicit_tuple_names =true:suggestioncsharp_prefer_simple_default_expression =true:warningdotnet_style_prefer_inferred_tuple_names =false:suggestiondotnet_style_prefer_inferred_anonymous_type_member_names =false:suggestioncsharp_style_prefer_local_over_anonymous_function =true:warningdotnet_style_prefer_conditional_expression_over_assignment =true:silentdotnet_style_prefer_conditional_expression_over_return =false:silentdotnet_style_prefer_compound_assignment =true:warningcsharp_style_prefer_index_operator =true:suggestioncsharp_style_prefer_range_operator =true:suggestioncsharp_style_unused_value_expression_statement_preference =discard_variable:silentcsharp_style_unused_value_assignment_preference =discard_variable:silentcsharp_style_prefer_switch_expression =true:suggestiondotnet_style_prefer_simplified_interpolation =true:warningdotnet_style_prefer_simplified_boolean_expressions =true:warningcsharp_style_implicit_object_creation_when_type_is_apparent =true:suggestiondotnet_style_namespace_match_folder =true:suggestioncsharp_style_prefer_tuple_swap =true:suggestioncsharp_style_prefer_utf8_string_literals =true:suggestiondotnet_style_prefer_collection_expression =true:suggestiondotnet_style_operator_placement_when_wrapping =beginning_of_line

Code Style | General | Expression-bodied members

Description _______________________________________________CodePreference ____________!! Severity !!
Use expression body for constructorsIDE0021Never🞅 Refactoring
Use expression body for methodsIDE0022Never🞅 Refactoring
Use expression body for operatorsIDE0024Never🞅 Refactoring
Use expression body for propertiesIDE0025When possible🛈 Suggestion
Use expression body for indexersIDE0026When possible🛈 Suggestion
Use expression body for accessorsIDE0027When possible🛈 Suggestion
Use expression body for lambdasIDE0053When possible🞅 Refactoring
Use expression body for local functionsIDE0061Never🛈 Suggestion
.editorconfig
csharp_style_expression_bodied_constructors =false:silentcsharp_style_expression_bodied_methods =false:silentcsharp_style_expression_bodied_operators =false:silentcsharp_style_expression_bodied_properties =true:suggestioncsharp_style_expression_bodied_indexers =true:suggestioncsharp_style_expression_bodied_accessors =true:suggestioncsharp_style_expression_bodied_lambdas =true:silentcsharp_style_expression_bodied_local_functions =false:suggestion

Code Style | General | Pattern matching preferences

Description _______________________________________________CodePreference ____________!! Severity !!
Prefer pattern matchingIDE0078Yes🛈 Suggestion
Prefer pattern matching overas withnull checkIDE0019Yes⚠ Warning
Prefer pattern matching overis withcast checkIDE0020Yes⚠ Warning
Prefer pattern matching over mixed type checkIDE0083Yes⚠ Warning
Prefer extended property patternIDE0170Yes⚠ Warning
.editorconfig
csharp_style_prefer_pattern_matching =true:suggestioncsharp_style_pattern_matching_over_as_with_null_check =true:warningcsharp_style_pattern_matching_over_is_with_cast_check =true:warningcsharp_style_prefer_not_pattern =true:warningcsharp_style_prefer_extended_property_pattern =true:warning

Code Style | General | Variable preferences

Description _______________________________________________CodePreference ____________!! Severity !!
Prefer inlined variable declarationIDE0018Yes⚠ Warning
Prefer deconstructed variable declarationIDE0042Yes🛈 Suggestion
.editorconfig
csharp_style_inlined_variable_declaration =true:warningcsharp_style_deconstructed_variable_declaration =true:suggestion

Code Style | General |null checking

Description _______________________________________________CodePreference ____________!! Severity !!
Prefer throw-expressionIDE0016Yes🛈 Suggestion
Prefer coalesce expressionIDE0029Yes⚠ Warning
Prefer null propagationIDE0031Yes⚠ Warning
Preferis null for reference equality checksIDE0041Yes⚠ Warning
Prefernull check over type checkIDE0150Yes🛈 Suggestion
Prefer conditional delegate callIDE1005Yes🛈 Suggestion
.editorconfig
csharp_style_throw_expression =true:suggestiondotnet_style_coalesce_expression =true:warningdotnet_style_null_propagation =true:warningdotnet_style_prefer_is_null_check_over_reference_equality_method =true:warningcsharp_style_prefer_null_check_over_type_check =true:suggestioncsharp_style_conditional_delegate_call =true:suggestion

Code Style | General |using preferences

Description _______________________________________________CodePreference ____________!! Severity !!
Preferredusing directive placementIDE0065Outside namespace⛔ Error
.editorconfig
csharp_using_directive_placement =outside_namespace:error

Code Style | General | Modifier preferences

Description _______________________________________________CodePreference ____________!! Severity !!
Require accesibility modifiersIDE0040Yes⚠ Warning
Prefer readonly fieldsIDE0044Yes⚠ Warning
Prefer static local functionsIDE0062Yes⚠ Warning
Prefer readonly structIDE0250Yes🛈 Suggestion
Prefer readonly struct memberIDE0251Yes🛈 Suggestion
.editorconfig
dotnet_style_require_accessibility_modifiers =true:warningdotnet_style_readonly_field =true:warningcsharp_prefer_static_local_function =true:warningcsharp_style_prefer_readonly_struct =true:suggestioncsharp_style_prefer_readonly_struct_member =true:suggestion

Code Style | General | Parameter preferences

Description _______________________________________________CodePreference ____________!! Severity !!
Avoid unused parametersIDE0060Non-public methods⚠ Warning
.editorconfig
dotnet_code_quality_unused_parameters =non_public:warning

Code Style | General | Style

Description _______________________________________________CodePreference ____________!! Severity !!
Use collection expression for emptyIDE0301Yes⚠ Warning
Use collection expression for stackallocIDE0302Yes🛈 Suggestion
Use collection expression forCreate()IDE0303Yes⚠ Warning
Use collection expression forbuilderIDE0304Yes⚠ Warning
Use collection expression forfluentIDE0305Yes⚠ Warning
Make anonymous function staticIDE0320Yes🛈 Suggestion
PreferSystem.Threading.LockIDE0330Yes⛔ Error
.editorconfig
dotnet_diagnostic.IDE0301.severity =warningdotnet_diagnostic.IDE0302.severity =suggestiondotnet_diagnostic.IDE0303.severity =warningdotnet_diagnostic.IDE0304.severity =warningdotnet_diagnostic.IDE0305.severity =warningdotnet_diagnostic.IDE0320.severity =suggestiondotnet_diagnostic.IDE0330.severity =error

Code Style | General | New line preferences

Description _______________________________________________CodePreference ____________!! Severity !!
Allow multiple blank linesIDE2000No⚠ Warning
Allow embeded statements on same lineIDE2001No⚠ Warning
Allow blank lines between consecutive bracesIDE2002No⚠ Warning
Allow statement immediately after blockIDE2003No⚠ Warning
Allow blank line after colon in constructor initializerIDE2004No⛔ Error
Allow blank line after token in conditional expressionIDE2005No⛔ Error
Allow blank line after token in arrow expression clauseIDE2006Yes🛈 Suggestion
.editorconfig
dotnet_style_allow_multiple_blank_lines_experimental =false:warningcsharp_style_allow_embedded_statements_on_same_line_experimental =false:warningcsharp_style_allow_blank_lines_between_consecutive_braces_experimental =false:warningdotnet_style_allow_statement_immediately_after_block_experimental =false:warningcsharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental =false:errorcsharp_style_allow_blank_line_after_token_in_conditional_expression_experimental =false:errorcsharp_style_allow_blank_line_after_token_in_arrow_expression_clause_experimental =true:suggestion

Code Style | Formatting | General

Description _________________________________________________________________________Value
Automatically format when typing🗹
Automatically format statement on;🗹
Automatically format block on}🗹
Automatically format on return🗹
Automatically format on paste🗹
.editorconfig
# Configurable at VS level

Code Style | Formatting | Indentation | General

Description _________________________________________________________________________Value
Indent code blocks🗹
Indent open and close braces
Indent case contents🗹
Indent case contents (when block)
Indent case labels🗹
.editorconfig
csharp_indent_block_contents =truecsharp_indent_braces =falsecsharp_indent_case_contents =truecsharp_indent_case_contents_when_block =falsecsharp_indent_switch_labels =true

Code Style | Formatting | Indentation | Label Indentation

Description _________________________________________________________________________Value
Placegoto labels in leftmost column
Indent labels normally
Placegoto labels one indent less than content🗹
.editorconfig
csharp_indent_labels =one_less_than_current

Code Style | Formatting | New Lines | New line options for braces

Description _________________________________________________________________________Value
Place open brace on new line for types🗹
Place open brace on new line for methods and local functions🗹
Place open brace on new line for properties, indexers, and events🗹
Place open brace on new line for property, indexer, and event accessors🗹
Place open brace on new line for anonymous methods🗹
Place open brace on new line for control blocks🗹
Place open brace on new line for anonymous types🗹
Place open brace on new line for object, collection, array, and with initializers🗹
Place open brace on new line for lambda expression🗹
.editorconfig
csharp_new_line_before_open_brace =all

Code Style | Formatting | New Lines | New line options for keywords

Description _________________________________________________________________________Value
Placeelse on new line🗹
Placecatch on new line🗹
Placefinally on new line🗹
.editorconfig
csharp_new_line_before_else =truecsharp_new_line_before_catch =truecsharp_new_line_before_finally =true

Code Style | Formatting | New Lines | New line options for expressions

Description _________________________________________________________________________Value
Place members in object initializers on new line🗹
Place members in anonymous types on new line🗹
Place query expression clauses on new line🗹
.editorconfig
csharp_new_line_before_members_in_object_initializers =truecsharp_new_line_before_members_in_anonymous_types =truecsharp_new_line_between_query_expression_clauses =true

Code Style | Formatting | Spacing | Set spacing for method declarations

Description _________________________________________________________________________Value
Insert space between method name and its opening parenthesis
Insert space within parameter list parentheses
Insert space within empty parameter list parentheses
.editorconfig
csharp_space_between_method_declaration_name_and_open_parenthesis =falsecsharp_space_between_method_declaration_parameter_list_parentheses =falsecsharp_space_between_method_declaration_empty_parameter_list_parentheses =false

Code Style | Formatting | Spacing | Set spacing for method calls

Description _________________________________________________________________________Value
Insert space between method name and its opening parenthesis
Insert space within argument list parentheses
Insert space within empty argument list parentheses
.editorconfig
csharp_space_between_method_call_name_and_opening_parenthesis =falsecsharp_space_between_method_call_parameter_list_parentheses =falsecsharp_space_between_method_call_empty_parameter_list_parentheses =false

Code Style | Formatting | Spacing | Set other spacing options

Description _________________________________________________________________________Value
Insert space after keywords in control flow statements🗹
Insert space within parentheses of expressions
Insert space within parentheses of type casts
Insert space within parentheses of control flow statements
Insert space after cast
Insert space in declaration statements
.editorconfig
csharp_space_after_keywords_in_control_flow_statements =truecsharp_space_between_parentheses =falsecsharp_space_after_cast =falsecsharp_space_around_declaration_statements =false

Code Style | Formatting | Spacing | Set spacing for brackets

Description _________________________________________________________________________Value
Insert space before open square bracket
Insert space within empty square brackets
Insert space within square brackets
.editorconfig
csharp_space_before_open_square_brackets =falsecsharp_space_between_square_brackets =falsecsharp_space_between_empty_square_brackets =false

Code Style | Formatting | Spacing | Set spacing for delimiters

Description _________________________________________________________________________Value
Insert space before colon for base or interface in type declarations🗹
Insert space after colon for base or interface in type declarations🗹
Insert space before comma
Insert space after comma🗹
Insert space before dot
Insert space after dot
Insert space before semicolon infor statement
Insert space after semicolon infor statement🗹
.editorconfig
csharp_space_before_colon_in_inheritance_clause =truecsharp_space_after_colon_in_inheritance_clause =truecsharp_space_before_comma =falsecsharp_space_after_comma =truecsharp_space_before_dot =falsecsharp_space_after_dot =falsecsharp_space_before_semicolon_in_for_statement =falsecsharp_space_after_semicolon_in_for_statement =true

Code Style | Formatting | Spacing | Set spacing for operators

Description _________________________________________________________________________Value
Ignore spaces around binary operators
Remove spaces before and after binary operators
Insert space before and after binary operators🗹
.editorconfig
csharp_space_around_binary_operators =before_and_after

Code Style | Formatting | Wrapping

Description _________________________________________________________________________Value
Leave block on single line🗹
Leave statements and member declarations on the same line
.editorconfig
csharp_preserve_single_line_blocks =truecsharp_preserve_single_line_statements =false

Microsoft.CodeAnalysis.NetAnalyzers

Microsoft.CodeAnalysis.NetAnalyzers | Design

CodeDescription ___________________________________________________________________________!! Severity !!
CA1000Do not declare static members on generic types⚠ Warning
CA1001Types that own disposable fields should be disposable⚠ Warning
CA1002Do not expose generic lists⚠ Warning
CA1003Use generic event handler instances🞅 None
CA1005Avoid excessive parameters on generic types⚠ Warning
CA1008Enums should have zero value⚠ Warning
CA1010Collections should implement generic interface🛈 Suggestion
CA1012Abstract types should not have public constructors⚠ Warning
CA1014Mark assemblies with CLSCompliantAttribute🞅 None
CA1016Mark assemblies with AssemblyVersionAttribute🞅 None
CA1017Mark assemblies with ComVisibleAttribute🞅 None
CA1018Mark attributes with AttributeUsageAttribute⚠ Warning
CA1019Define accessors for attribute arguments🛈 Suggestion
CA1021Avoid out parameters🛈 Suggestion
CA1024Use properties where appropriate🛈 Suggestion
CA1027Mark enums with FlagsAttribute🛈 Suggestion
CA1028Enum storage should be Int32⚠ Warning
CA1030Use events where appropriate🞅 None
CA1031Do not catch general exception types🛈 Suggestion
CA1032Implement standard exception constructors⚠ Warning
CA1033Interface methods should be callable by child types⚠ Warning
CA1034Nested types should not be visible⚠ Warning
CA1036Override methods on comparable types🛈 Suggestion
CA1040Avoid empty interfaces🞅 None
CA1041Provide ObsoleteAttribute message⛔ Error
CA1043Use integral or string argument for indexers⚠ Warning
CA1044Properties should not be write only🞅 None
CA1045Do not pass types by reference⚠ Warning
CA1046Do not overload operator equals on reference types⚠ Warning
CA1047Do not declare protected members in sealed types🞅 None
CA1050Declare types in namespaces⚠ Warning
CA1051Do not declare visible instance fields🞅 None
CA1052Static holder types should be Static or NotInheritable⛔ Error
CA1053Static holder types should not have default constructors-
CA1054URI parameters should not be strings⚠ Warning
CA1055URI return values should not be strings⚠ Warning
CA1056URI properties should not be strings⚠ Warning
CA1058Types should not extend certain base types⚠ Warning
CA1060Move P/Invokes to NativeMethods class🞅 None
CA1061Do not hide base class methods⚠ Warning
CA1062Validate arguments of public methods🞅 None
CA1063Implement IDisposable correctly⚠ Warning
CA1064Exceptions should be public⛔ Error
CA1065Do not raise exceptions in unexpected locations⛔ Error
CA1066Implement IEquatable when overriding Equals⚠ Warning
CA1067Override Equals when implementing IEquatable⚠ Warning
CA1068CancellationToken parameters must come last⚠ Warning
CA1069Enums should not have duplicate values⚠ Warning
CA1070Do not declare event fields as virtual🛈 Suggestion
.editorconfig
dotnet_diagnostic.CA1000.severity =warningdotnet_diagnostic.CA1001.severity =warningdotnet_diagnostic.CA1002.severity =warningdotnet_diagnostic.CA1003.severity =nonedotnet_diagnostic.CA1005.severity =warningdotnet_diagnostic.CA1008.severity =warningdotnet_diagnostic.CA1010.severity =suggestiondotnet_diagnostic.CA1012.severity =warningdotnet_diagnostic.CA1014.severity =nonedotnet_diagnostic.CA1016.severity =nonedotnet_diagnostic.CA1017.severity =nonedotnet_diagnostic.CA1018.severity =warningdotnet_diagnostic.CA1019.severity =suggestiondotnet_diagnostic.CA1021.severity =suggestiondotnet_diagnostic.CA1024.severity =suggestiondotnet_diagnostic.CA1027.severity =suggestiondotnet_diagnostic.CA1028.severity =warningdotnet_diagnostic.CA1030.severity =nonedotnet_diagnostic.CA1031.severity =suggestiondotnet_diagnostic.CA1032.severity =warningdotnet_diagnostic.CA1033.severity =warningdotnet_diagnostic.CA1034.severity =warningdotnet_diagnostic.CA1036.severity =suggestiondotnet_diagnostic.CA1040.severity =nonedotnet_diagnostic.CA1041.severity =errordotnet_diagnostic.CA1043.severity =warningdotnet_diagnostic.CA1044.severity =nonedotnet_diagnostic.CA1045.severity =warningdotnet_diagnostic.CA1046.severity =warningdotnet_diagnostic.CA1047.severity =nonedotnet_diagnostic.CA1050.severity =warningdotnet_diagnostic.CA1051.severity =errordotnet_diagnostic.CA1052.severity =error#dotnet_diagnostic.CA1053.severity = warningdotnet_diagnostic.CA1054.severity =warningdotnet_diagnostic.CA1055.severity =warningdotnet_diagnostic.CA1056.severity =warningdotnet_diagnostic.CA1058.severity =warningdotnet_diagnostic.CA1060.severity =nonedotnet_diagnostic.CA1061.severity =warningdotnet_diagnostic.CA1062.severity =nonedotnet_diagnostic.CA1063.severity =warningdotnet_diagnostic.CA1064.severity =errordotnet_diagnostic.CA1065.severity =errordotnet_diagnostic.CA1066.severity =warningdotnet_diagnostic.CA1067.severity =warningdotnet_diagnostic.CA1068.severity =warningdotnet_diagnostic.CA1069.severity =warningdotnet_diagnostic.CA1070.severity =suggestion

Microsoft.CodeAnalysis.NetAnalyzers | Documentation

CodeDescription ___________________________________________________________________________!! Severity !!
CA1200Avoid using cref tags with a prefix🞅 None
.editorconfig
dotnet_diagnostic.CA1200.severity =none

Microsoft.CodeAnalysis.NetAnalyzers | Globalization

CodeDescription ___________________________________________________________________________!! Severity !!
CA1303Do not pass literals as localized parameters⚠ Warning
CA1304Specify CultureInfo⚠ Warning
CA1305Specify IFormatProvider⚠ Warning
CA1307Specify StringComparison for clarity⚠ Warning
CA1308Normalize strings to uppercase🛈 Suggestion
CA1309Use ordinal StringComparison⚠ Warning
CA1310Specify StringComparison for correctness⚠ Warning
CA1311Specify a culture or use an invariant version⚠ Warning
CA2101Specify marshalling for P/Invoke string arguments🛈 Suggestion
.editorconfig
dotnet_diagnostic.CA1303.severity =warningdotnet_diagnostic.CA1304.severity =warningdotnet_diagnostic.CA1305.severity =warningdotnet_diagnostic.CA1307.severity =warningdotnet_diagnostic.CA1308.severity =suggestiondotnet_diagnostic.CA1309.severity =warningdotnet_diagnostic.CA1310.severity =warningdotnet_diagnostic.CA1311.severity =warningdotnet_diagnostic.CA2101.severity =suggestion

Microsoft.CodeAnalysis.NetAnalyzers | Interoperability

CodeDescription ___________________________________________________________________________!! Severity !!
CA1401P/Invokes should not be visible🛈 Suggestion
CA1416Validate platform compatibility⚠ Warning
CA1417Do not useOutAttribute on string parameters for P/Invokes⚠ Warning
CA1418Validate platform compatibility⚠ Warning
CA1419Provide a parameterless ctor for types derived from
System.Runtime.InteropServices.SafeHandle
🛈 Suggestion
CA1420Property, type, or attribute requires runtime marshalling⚠ Warning
CA1421Method uses runtime marshalling whenDisableRuntimeMarshalling is applied🛈 Suggestion
CA1422Validate platform compatibility - Obsoleted APIs⚠ Warning
.editorconfig
dotnet_diagnostic.CA1401.severity =suggestiondotnet_diagnostic.CA1416.severity =warningdotnet_diagnostic.CA1417.severity =warningdotnet_diagnostic.CA1418.severity =warningdotnet_diagnostic.CA1419.severity =suggestiondotnet_diagnostic.CA1420.severity =warningdotnet_diagnostic.CA1421.severity =suggestiondotnet_diagnostic.CA1422.severity =warning

Microsoft.CodeAnalysis.NetAnalyzers | Maintainability

CodeDescription ___________________________________________________________________________!! Severity !!
CA1501Avoid excessive inheritance⚠ Warning
CA1502Avoid excessive complexity⚠ Warning
CA1505Avoid unmaintainable code⚠ Warning
CA1506Avoid excessive class coupling⚠ Warning
CA1507Usenameof in place of string⚠ Warning
CA1508Avoid dead conditional code⚠ Warning
CA1509Invalid entry in code metrics configuration file⛔ Error
CA1510UseArgumentNullException throw helper⚠ Warning
CA1511UseArgumentException throw helper⚠ Warning
CA1512UseArgumentOutOfRangeException throw helper⚠ Warning
CA1513UseObjectDisposedException throw helper⚠ Warning
CA1514Avoid redundant length argument⚠ Warning
CA1515Consider making public types internal⚠ Warning
.editorconfig
dotnet_diagnostic.CA1501.severity =warningdotnet_diagnostic.CA1502.severity =warningdotnet_diagnostic.CA1505.severity =warningdotnet_diagnostic.CA1506.severity =warningdotnet_diagnostic.CA1507.severity =warningdotnet_diagnostic.CA1508.severity =warningdotnet_diagnostic.CA1509.severity =errordotnet_diagnostic.CA1510.severity =warningdotnet_diagnostic.CA1511.severity =warningdotnet_diagnostic.CA1512.severity =warningdotnet_diagnostic.CA1513.severity =warningdotnet_diagnostic.CA1514.severity =warningdotnet_diagnostic.CA1515.severity =warning

Microsoft.CodeAnalysis.NetAnalyzers | Naming

CodeDescription ___________________________________________________________________________!! Severity !!
CA1700Do not name enum valuesReserved🛈 Suggestion
CA1707Identifiers should not contain underscores⛔ Error
CA1708Identifiers should differ by more than case🛈 Suggestion
CA1710Identifiers should have correct suffix⚠ Warning
CA1711Identifiers should not have incorrect suffix⚠ Warning
CA1712Do not prefix enum values with type name⛔ Error
CA1713Events should not have before or after prefix⚠ Warning
CA1714Flags enums should have plural names⚠ Warning
CA1715Identifiers should have correct prefix⚠ Warning
CA1716Identifiers should not match keywords⚠ Warning
CA1717OnlyFlagsAttribute enums should have plural names🛈 Suggestion
CA1721Property names should not match get methods⚠ Warning
CA1720Identifiers should not contain type names⚠ Warning
CA1724Type names should not match namespaces⚠ Warning
CA1725Parameter names should match base declaration⚠ Warning
CA1727Use PascalCase for named placeholders⚠ Warning
.editorconfig
dotnet_diagnostic.CA1700.severity =suggestiondotnet_diagnostic.CA1707.severity =errordotnet_diagnostic.CA1708.severity =suggestiondotnet_diagnostic.CA1710.severity =warningdotnet_diagnostic.CA1711.severity =warningdotnet_diagnostic.CA1712.severity =errordotnet_diagnostic.CA1713.severity =warningdotnet_diagnostic.CA1714.severity =warningdotnet_diagnostic.CA1715.severity =warningdotnet_diagnostic.CA1716.severity =warningdotnet_diagnostic.CA1717.severity =suggestiondotnet_diagnostic.CA1720.severity =warningdotnet_diagnostic.CA1721.severity =warningdotnet_diagnostic.CA1724.severity =warningdotnet_diagnostic.CA1725.severity =warningdotnet_diagnostic.CA1727.severity =warning

Microsoft.CodeAnalysis.NetAnalyzers | Performance

CodeDescription ___________________________________________________________________________!! Severity !!
CA1802Use literals where appropriate⚠ Warning
CA1805Do not initialize unnecessarily⚠ Warning
CA1806Do not ignore method results⚠ Warning
CA1810Initialize reference type static fields inline⚠ Warning
CA1812Avoid uninstantiated internal classes⚠ Warning
CA1813Avoid unsealed attributes⛔ Error
CA1814Prefer jagged arrays over multidimensional🛈 Suggestion
CA1815Override equals and operator equals on value types⚠ Warning
CA1819Properties should not return arrays⚠ Warning
CA1820Test for empty strings using string length⚠ Warning
CA1821Remove empty finalizers⚠ Warning
CA1822Mark members as static⚠ Warning
CA1823Avoid unused private fields⚠ Warning
CA1824Mark assemblies withNeutralResourcesLanguageAttribute🞅 None
CA1825Avoid zero-length array allocations⚠ Warning
CA1826Use property instead of Linq Enumerable method⚠ Warning
CA1827Do not useCount/LongCount whenAny can be used⚠ Warning
CA1828Do not useCountAsync/LongCountAsync whenAnyAsync can be used⚠ Warning
CA1829UseLength/Count property instead ofEnumerable.Count method⚠ Warning
CA1830Prefer strongly-typedAppend andInsert method overloads onStringBuilder⚠ Warning
CA1831UseAsSpan instead of Range-based indexers for string when appropriate🛈 Suggestion
CA1832UseAsSpan orAsMemory instead of Range-based indexers for getting
ReadOnlySpan or ReadOnlyMemory [..]
🛈 Suggestion
CA1833UseAsSpan orAsMemory instead of Range-based indexers for getting
Span or Memory [..]
🛈 Suggestion
CA1834UseStringBuilder.Append(char) for single character strings⚠ Warning
CA1835Prefer the memory-based overloads ofReadAsync/WriteAsync methods [..]🛈 Suggestion
CA1836PreferIsEmpty overCount when available⚠ Warning
CA1837UseEnvironment.ProcessId instead ofProcess.GetCurrentProcess().Id🛈 Suggestion
CA1838Avoid StringBuilder parameters for P/Invokes🛈 Suggestion
CA1839UseEnvironment.ProcessPath [..]🛈 Suggestion
CA1840UseEnvironment.CurrentManagedThreadId [..]🛈 Suggestion
CA1841Prefer Dictionary Contains methods⚠ Warning
CA1842Do not useWhenAll with a single task⛔ Error
CA1843Do not useWaitAll with a single task⛔ Error
CA1844Provide memory-based overrides of async methods when subclassingStream⚠ Warning
CA1845Use span-basedstring.Concat⚠ Warning
CA1846PreferAsSpan overSubstring⚠ Warning
CA1847Usestring.Contains(char) instead ofstring.Contains(string) with single chars⚠ Warning
CA1848Use the LoggerMessage delegates🛈 Suggestion
CA1849Call async methods when in an async method⚠ Warning
CA1850Prefer staticHashData method overComputeHash🞅 None
CA1851Possible multiple enumerations of IEnumerable collection⚠ Warning
CA1852Seal internal types⚠ Warning
CA1853Unnecessary call toDictionary.ContainsKey(key)⚠ Warning
CA1854Prefer theIDictionary.TryGetValue(TKey, out TValue) method🛈 Suggestion
CA1855UseSpan[T].Clear() instead ofSpan[T].Fill()🛈 Suggestion
CA1856Incorrect usage ofConstantExpected attribute⛔ Error
CA1857The parameter expects a constant for optimal performance⚠ Warning
CA1858UseStartsWith instead ofIndexOf⚠ Warning
CA1859Use concrete types when possible for improved performance🛈 Suggestion
CA1860Avoid usingEnumerable.Any() extension method⚠ Warning
CA1861Avoid constant arrays as arguments⚠ Warning
CA1862Use theStringComparison method overloads for case-insensitive comparisons⚠ Warning
CA1863UseCompositeFormat🛈 Suggestion
CA1864Prefer theIDictionary.TryAdd(TKey, TValue) method⚠ Warning
CA1865Usestring.Method(char) instead ofstring.Method(string) for string with one char⚠ Warning
CA1866Usestring.Method(char) instead ofstring.Method(string) for string with one char⚠ Warning
CA1867Usestring.Method(char) instead ofstring.Method(string) for string with one char🛈 Suggestion
CA1868Unnecessary call toContains for sets⚠ Warning
CA1869Cache and reuseJsonSerializerOptions instances⚠ Warning
CA1870Use a cachedSearchValues instance⚠ Warning
CA1871Do not pass a nullable struct toArgumentNullException.ThrowIfNull⚠ Warning
CA1872PreferConvert.ToHexString andConvert.ToHexStringLower over call chains based onBitConverter.ToString⚠ Warning
.editorconfig
dotnet_diagnostic.CA1802.severity =warningdotnet_diagnostic.CA1805.severity =warningdotnet_diagnostic.CA1806.severity =warningdotnet_diagnostic.CA1810.severity =warningdotnet_diagnostic.CA1812.severity =warningdotnet_diagnostic.CA1813.severity =errordotnet_diagnostic.CA1814.severity =suggestiondotnet_diagnostic.CA1815.severity =warningdotnet_diagnostic.CA1819.severity =warningdotnet_diagnostic.CA1820.severity =warningdotnet_diagnostic.CA1821.severity =warningdotnet_diagnostic.CA1822.severity =warningdotnet_diagnostic.CA1823.severity =warningdotnet_diagnostic.CA1824.severity =nonedotnet_diagnostic.CA1825.severity =warningdotnet_diagnostic.CA1826.severity =warningdotnet_diagnostic.CA1827.severity =warningdotnet_diagnostic.CA1828.severity =warningdotnet_diagnostic.CA1829.severity =warningdotnet_diagnostic.CA1830.severity =warningdotnet_diagnostic.CA1831.severity =suggestiondotnet_diagnostic.CA1832.severity =suggestiondotnet_diagnostic.CA1833.severity =suggestiondotnet_diagnostic.CA1834.severity =warningdotnet_diagnostic.CA1835.severity =suggestiondotnet_diagnostic.CA1836.severity =warningdotnet_diagnostic.CA1837.severity =suggestiondotnet_diagnostic.CA1838.severity =suggestiondotnet_diagnostic.CA1839.severity =suggestiondotnet_diagnostic.CA1840.severity =suggestiondotnet_diagnostic.CA1841.severity =warningdotnet_diagnostic.CA1842.severity =errordotnet_diagnostic.CA1843.severity =errordotnet_diagnostic.CA1844.severity =warningdotnet_diagnostic.CA1845.severity =warningdotnet_diagnostic.CA1846.severity =warningdotnet_diagnostic.CA1847.severity =warningdotnet_diagnostic.CA1848.severity =suggestiondotnet_diagnostic.CA1849.severity =warningdotnet_diagnostic.CA1850.severity =nonedotnet_diagnostic.CA1851.severity =warningdotnet_diagnostic.CA1852.severity =warningdotnet_diagnostic.CA1853.severity =warningdotnet_diagnostic.CA1854.severity =suggestiondotnet_diagnostic.CA1855.severity =suggestiondotnet_diagnostic.CA1856.severity =errordotnet_diagnostic.CA1857.severity =warningdotnet_diagnostic.CA1858.severity =warningdotnet_diagnostic.CA1859.severity =suggestiondotnet_diagnostic.CA1860.severity =warningdotnet_diagnostic.CA1861.severity =warningdotnet_diagnostic.CA1862.severity =warningdotnet_diagnostic.CA1863.severity =suggestiondotnet_diagnostic.CA1864.severity =warningdotnet_diagnostic.CA1865.severity =warningdotnet_diagnostic.CA1866.severity =warningdotnet_diagnostic.CA1867.severity =suggestiondotnet_diagnostic.CA1868.severity =warningdotnet_diagnostic.CA1869.severity =warningdotnet_diagnostic.CA1870.severity =warningdotnet_diagnostic.CA1871.severity =warningdotnet_diagnostic.CA1872.severity =warning

Microsoft.CodeAnalysis.NetAnalyzers | Reliability

CodeDescription ___________________________________________________________________________!! Severity !!
CA2000Dispose objects before losing scope🛈 Suggestion
CA2002Do not lock on objects with weak identity⛔ Error
CA2007Do not directly await a Task🞅 None
CA2008Do not create tasks without passing aTaskScheduler🛈 Suggestion
CA2009Do not callToImmutableCollection on anImmutableCollection value⚠ Warning
CA2011Do not assign property within its setter⛔ Error
CA2012UseValueTasks correctly🛈 Suggestion
CA2013Do not useReferenceEquals with value types⚠ Warning
CA2014Do not usestackalloc in loops⚠ Warning
CA2015Do not define finalizers for types derived fromMemoryManager⚠ Warning
CA2016Forward theCancellationToken parameter to methods that take one⚠ Warning
CA2017Parameter count mismatch⚠ Warning
CA2018The count argument toBuffer.BlockCopy should specify the number of bytes [..]⚠ Warning
CA2019ThreadStatic fields should not use inline initialization🛈 Suggestion
CA2020Prevent behavioral change caused by built-in operators ofIntPtr/UIntPtr🛈 Suggestion
CA2021Don't callEnumerable.Cast orEnumerable.OfType with incompatible types⚠ Warning
CA2022Avoid inexact read withStream.Read⚠ Warning
.editorconfig
dotnet_diagnostic.CA2000.severity =suggestiondotnet_diagnostic.CA2002.severity =errordotnet_diagnostic.CA2007.severity =nonedotnet_diagnostic.CA2008.severity =suggestiondotnet_diagnostic.CA2009.severity =warningdotnet_diagnostic.CA2011.severity =errordotnet_diagnostic.CA2012.severity =suggestiondotnet_diagnostic.CA2013.severity =warningdotnet_diagnostic.CA2014.severity =warningdotnet_diagnostic.CA2015.severity =warningdotnet_diagnostic.CA2016.severity =warningdotnet_diagnostic.CA2017.severity =warningdotnet_diagnostic.CA2018.severity =warningdotnet_diagnostic.CA2019.severity =suggestiondotnet_diagnostic.CA2020.severity =suggestiondotnet_diagnostic.CA2021.severity =warningdotnet_diagnostic.CA2022.severity =warning

Microsoft.CodeAnalysis.NetAnalyzers | Security

CodeDescription ___________________________________________________________________________!! Severity !!
CA2100Review SQL queries for security vulnerabilities⚠ Warning
CA2109Review visible event handlers⚠ Warning
CA2119Seal methods that satisfy private interfaces⚠ Warning
CA2153Avoid handling Corrupted State Exceptions⚠ Warning
CA2300Do not use insecure deserializer BinaryFormatter⛔ Error
CA2301Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder🞅 None
CA2302Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize🞅 None
CA2305Do not use insecure deserializer LosFormatter⛔ Error
CA2310Do not use insecure deserializer NetDataContractSerializer⛔ Error
CA2311Do not deserialize without first setting NetDataContractSerializer.Binder🞅 None
CA2312Ensure NetDataContractSerializer.Binder is set before deserializing🞅 None
CA2315Do not use insecure deserializer ObjectStateFormatter⛔ Error
CA2321Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver⚠ Warning
CA2322Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver [..]⚠ Warning
CA2326Do not use TypeNameHandling values other than None⚠ Warning
CA2327Do not use insecure JsonSerializerSettings⚠ Warning
CA2328Ensure that JsonSerializerSettings are secure⚠ Warning
CA2329Do not deserialize with JsonSerializer using an insecure configuration⚠ Warning
CA2330Ensure that JsonSerializer has a secure configuration when deserializing⚠ Warning
CA2350Ensure DataTable.ReadXml()'s input is trusted⚠ Warning
CA2351Ensure DataSet.ReadXml()'s input is trusted⚠ Warning
CA2352Unsafe DataSet or DataTable in serializable type can be vulnerable to RCEA⚠ Warning
CA2353Unsafe DataSet or DataTable in serializable type⚠ Warning
CA2354Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to RCEA⚠ Warning
CA2355Unsafe DataSet or DataTable in deserialized object graph⚠ Warning
CA2356Unsafe DataSet or DataTable type in web deserialized object graph⚠ Warning
CA2361Ensure autogen class with DataSet.ReadXml() is not used with untrusted data⚠ Warning
CA2362Unsafe DataSet or DataTable in autogen serializable type can be vulnerable to RCEA⚠ Warning
CA3001Review code for SQL injection vulnerabilities⚠ Warning
CA3002Review code for XSS vulnerabilities⚠ Warning
CA3003Review code for file path injection vulnerabilities⚠ Warning
CA3004Review code for information disclosure vulnerabilities⚠ Warning
CA3005Review code for LDAP injection vulnerabilities⚠ Warning
CA3006Review code for process command injection vulnerabilities⚠ Warning
CA3007Review code for open redirect vulnerabilities⚠ Warning
CA3008Review code for XPath injection vulnerabilities⚠ Warning
CA3009Review code for XML injection vulnerabilities⚠ Warning
CA3010Review code for XAML injection vulnerabilities⚠ Warning
CA3011Review code for DLL injection vulnerabilities⚠ Warning
CA3012Review code for regex injection vulnerabilities⚠ Warning
CA3061Do not add schema by URL⚠ Warning
CA3075Insecure DTD Processing⚠ Warning
CA3076Insecure XSLT Script Execution⚠ Warning
CA3077Insecure Processing in API Design, XML Document and XML Text Reader⚠ Warning
CA3147Mark verb handlers with ValidateAntiForgeryToken⚠ Warning
CA5350Do Not Use Weak Cryptographic Algorithms⚠ Warning
CA5351Do Not Use Broken Cryptographic Algorithms⚠ Warning
CA5358Do Not Use Unsafe Cipher Modes⚠ Warning
CA5359Do not disable certificate validation⚠ Warning
CA5360Do not call dangerous methods in deserialization⚠ Warning
CA5361Do not disable SChannel use of strong crypto⚠ Warning
CA5362Potential reference cycle in deserialized object graph🛈 Suggestion
CA5363Do not disable request validation⚠ Warning
CA5364Do not use deprecated security protocols⚠ Warning
CA5365Do Not Disable HTTP Header Checking⚠ Warning
CA5366Use XmlReader For DataSet Read XML⚠ Warning
CA5367Do not serialize types with pointer fields⛔ Error
CA5368Set ViewStateUserKey For Classes Derived From Page⚠ Warning
CA5369Use XmlReader for Deserialize⚠ Warning
CA5370Use XmlReader for validating reader⚠ Warning
CA5371Use XmlReader for schema read⚠ Warning
CA5372Use XmlReader for XPathDocument⚠ Warning
CA5373Do not use obsolete key derivation function⚠ Warning
CA5374Do not use XslTransform⚠ Warning
CA5375Do not use account shared access signature⚠ Warning
CA5376Use SharedAccessProtocol HttpsOnly⚠ Warning
CA5377Use container level access policy⚠ Warning
CA5378Do not disable ServicePointManagerSecurityProtocols⚠ Warning
CA5379Ensure key derivation function algorithm is sufficiently strong⚠ Warning
CA5380Do not add certificates to root store⚠ Warning
CA5381Ensure certificates are not added to root store⚠ Warning
CA5382Use secure cookies in ASP.NET Core⚠ Warning
CA5383Ensure use secure cookies in ASP.NET Core⚠ Warning
CA5384Do not use digital signature algorithm (DSA)⚠ Warning
CA5385Use Rivest–Shamir–Adleman (RSA) algorithm with sufficient key size⚠ Warning
CA5386Avoid hardcoding SecurityProtocolType value⚠ Warning
CA5387Do not use weak key derivation function with insufficient iteration count⚠ Warning
CA5388Ensure sufficient iteration count when using weak key derivation function⚠ Warning
CA5389Do not add archive item's path to the target file system path⚠ Warning
CA5390Do not hard-code encryption key⚠ Warning
CA5391Use antiforgery tokens in ASP.NET Core MVC controllers⚠ Warning
CA5392Use DefaultDllImportSearchPaths attribute for P/Invokes🞅 None
CA5393Do not use unsafe DllImportSearchPath value🞅 None
CA5394Do not use insecure randomness⚠ Warning
CA5395Miss HttpVerb attribute for action methods⛔ Error
CA5396Set HttpOnly to true for HttpCookie⚠ Warning
CA5397Do not use deprecated SslProtocols values⚠ Warning
CA5398Avoid hardcoded SslProtocols values⛔ Error
CA5399Enable HttpClient certificate revocation list check⚠ Warning
CA5400Ensure HttpClient certificate revocation list check is not disabled⚠ Warning
CA5401Do not use CreateEncryptor with non-default IV⚠ Warning
CA5402Use CreateEncryptor with the default IV⚠ Warning
CA5403Do not hard-code certificate⛔ Error
CA5404Do not disable token validation checks⚠ Warning
CA5405Do not always skip token validation in delegates⚠ Warning
.editorconfig
dotnet_diagnostic.CA2100.severity =warningdotnet_diagnostic.CA2109.severity =warningdotnet_diagnostic.CA2119.severity =warningdotnet_diagnostic.CA2153.severity =warningdotnet_diagnostic.CA2300.severity =errordotnet_diagnostic.CA2301.severity =nonedotnet_diagnostic.CA2302.severity =nonedotnet_diagnostic.CA2305.severity =errordotnet_diagnostic.CA2310.severity =errordotnet_diagnostic.CA2311.severity =nonedotnet_diagnostic.CA2312.severity =nonedotnet_diagnostic.CA2315.severity =errordotnet_diagnostic.CA2321.severity =warningdotnet_diagnostic.CA2322.severity =warningdotnet_diagnostic.CA2326.severity =warningdotnet_diagnostic.CA2327.severity =warningdotnet_diagnostic.CA2328.severity =warningdotnet_diagnostic.CA2329.severity =warningdotnet_diagnostic.CA2330.severity =warningdotnet_diagnostic.CA2350.severity =warningdotnet_diagnostic.CA2351.severity =warningdotnet_diagnostic.CA2352.severity =warningdotnet_diagnostic.CA2353.severity =warningdotnet_diagnostic.CA2354.severity =warningdotnet_diagnostic.CA2355.severity =warningdotnet_diagnostic.CA2356.severity =warningdotnet_diagnostic.CA2361.severity =warningdotnet_diagnostic.CA2362.severity =warningdotnet_diagnostic.CA3001.severity =warningdotnet_diagnostic.CA3002.severity =warningdotnet_diagnostic.CA3003.severity =warningdotnet_diagnostic.CA3004.severity =warningdotnet_diagnostic.CA3005.severity =warningdotnet_diagnostic.CA3006.severity =warningdotnet_diagnostic.CA3007.severity =warningdotnet_diagnostic.CA3008.severity =warningdotnet_diagnostic.CA3009.severity =warningdotnet_diagnostic.CA3010.severity =warningdotnet_diagnostic.CA3011.severity =warningdotnet_diagnostic.CA3012.severity =warningdotnet_diagnostic.CA3061.severity =warningdotnet_diagnostic.CA3075.severity =warningdotnet_diagnostic.CA3076.severity =warningdotnet_diagnostic.CA3077.severity =warningdotnet_diagnostic.CA3147.severity =warningdotnet_diagnostic.CA5350.severity =warningdotnet_diagnostic.CA5351.severity =warningdotnet_diagnostic.CA5358.severity =warningdotnet_diagnostic.CA5359.severity =warningdotnet_diagnostic.CA5360.severity =warningdotnet_diagnostic.CA5361.severity =warningdotnet_diagnostic.CA5362.severity =suggestiondotnet_diagnostic.CA5363.severity =warningdotnet_diagnostic.CA5364.severity =warningdotnet_diagnostic.CA5365.severity =warningdotnet_diagnostic.CA5366.severity =warningdotnet_diagnostic.CA5367.severity =errordotnet_diagnostic.CA5368.severity =warningdotnet_diagnostic.CA5369.severity =warningdotnet_diagnostic.CA5370.severity =warningdotnet_diagnostic.CA5371.severity =warningdotnet_diagnostic.CA5372.severity =warningdotnet_diagnostic.CA5373.severity =warningdotnet_diagnostic.CA5374.severity =warningdotnet_diagnostic.CA5375.severity =warningdotnet_diagnostic.CA5376.severity =warningdotnet_diagnostic.CA5377.severity =warningdotnet_diagnostic.CA5378.severity =warningdotnet_diagnostic.CA5379.severity =warningdotnet_diagnostic.CA5380.severity =warningdotnet_diagnostic.CA5381.severity =warningdotnet_diagnostic.CA5382.severity =warningdotnet_diagnostic.CA5383.severity =warningdotnet_diagnostic.CA5384.severity =warningdotnet_diagnostic.CA5385.severity =warningdotnet_diagnostic.CA5386.severity =warningdotnet_diagnostic.CA5387.severity =warningdotnet_diagnostic.CA5388.severity =warningdotnet_diagnostic.CA5389.severity =warningdotnet_diagnostic.CA5390.severity =warningdotnet_diagnostic.CA5391.severity =warningdotnet_diagnostic.CA5392.severity =nonedotnet_diagnostic.CA5393.severity =nonedotnet_diagnostic.CA5394.severity =suggestiondotnet_diagnostic.CA5395.severity =errordotnet_diagnostic.CA5396.severity =warningdotnet_diagnostic.CA5397.severity =warningdotnet_diagnostic.CA5398.severity =errordotnet_diagnostic.CA5399.severity =warningdotnet_diagnostic.CA5400.severity =warningdotnet_diagnostic.CA5401.severity =warningdotnet_diagnostic.CA5402.severity =warningdotnet_diagnostic.CA5403.severity =errordotnet_diagnostic.CA5404.severity =warningdotnet_diagnostic.CA5405.severity =warning

Microsoft.CodeAnalysis.NetAnalyzers | Usage

CodeDescription ___________________________________________________________________________!! Severity !!
CA1801Review unused parameters⚠ Warning
CA1816Call GC.SuppressFinalize correctly🛈 Suggestion
CA2200Rethrow to preserve stack details⚠ Warning
CA2201Do not raise reserved exception types⚠ Warning
CA2207Initialize value type static fields inline⚠ Warning
CA2208Instantiate argument exceptions correctly⚠ Warning
CA2211Non-constant fields should not be visible⚠ Warning
CA2213Disposable fields should be disposed⚠ Warning
CA2214Do not call overridable methods in constructors⚠ Warning
CA2215Dispose methods should call base class dispose⚠ Warning
CA2216Disposable types should declare finalizer⚠ Warning
CA2217Do not mark enums with FlagsAttribute⛔ Error
CA2218Override GetHashCode on overriding Equals⚠ Warning
CA2219Do not raise exceptions in exception clauses⛔ Error
CA2224Override Equals on overloading operator equals🞅 None
CA2225Operator overloads have named alternates🞅 None
CA2226Operators should have symmetrical overloads🞅 None
CA2227Collection properties should be read only⚠ Warning
CA2229Implement serialization constructors🞅 None
CA2231Overload operator equals on overriding ValueType.Equals⚠ Warning
CA2234PassSystem.Uri objects instead of strings⚠ Warning
CA2235Mark all non-serializable fields⚠ Warning
CA2237Mark ISerializable types with SerializableAttribute⚠ Warning
CA2241Provide correct arguments to formatting methods⛔ Error
CA2242Test for NaN correctly⛔ Error
CA2243Attribute string literals should parse correctly⛔ Error
CA2244Do not duplicate indexed element initializations⛔ Error
CA2245Do not assign a property to itself⛔ Error
CA2246Do not assign a symbol and its member in the same statement⛔ Error
CA2247Argument passed to TaskCompletionSource constructor should be
TaskCreationOptions enum
⚠ Warning
CA2248Provide correct enum argument to Enum.HasFlag⛔ Error
CA2249Consider using String.Contains instead of String.IndexOf⚠ Warning
CA2250UseThrowIfCancellationRequested⚠ Warning
CA2251UseString.Equals overString.Compare⚠ Warning
CA2252Opt in to preview features before using them⛔ Error
CA2253Named placeholders should not be numeric values⚠ Warning
CA2254Template should be a static expression⚠ Warning
CA2255TheModuleInitializer attribute should not be used in libraries⚠ Warning
CA2256All members declared in parent interfaces must implementDICI-attributed interface⚠ Warning
CA2257Members defined on an interface with theDICIAttribute should bestatic⚠ Warning
CA2258Providing aDICI interface in Visual Basic is unsupported⚠ Warning
CA2259EnsureThreadStatic is only used with static fields⚠ Warning
CA2260Implement generic math interfaces correctly⚠ Warning
CA2261Do not useConfigureAwaitOptions.SuppressThrowing withTask⚠ Warning
CA2262SetMaxResponseHeadersLength properly⚠ Warning
CA2263Prefer generic overload when type is known⚠ Warning
CA2264Do not pass a non-nullable value toArgumentNullException.ThrowIfNull⚠ Warning
CA2265Do not compareSpan tonull ordefault⚠ Warning
.editorconfig
dotnet_diagnostic.CA1801.severity =warningdotnet_diagnostic.CA1816.severity =suggestiondotnet_diagnostic.CA2200.severity =warningdotnet_diagnostic.CA2201.severity =warningdotnet_diagnostic.CA2207.severity =warningdotnet_diagnostic.CA2208.severity =warningdotnet_diagnostic.CA2211.severity =warningdotnet_diagnostic.CA2213.severity =warningdotnet_diagnostic.CA2214.severity =warningdotnet_diagnostic.CA2215.severity =warningdotnet_diagnostic.CA2216.severity =warningdotnet_diagnostic.CA2217.severity =errordotnet_diagnostic.CA2218.severity =warningdotnet_diagnostic.CA2219.severity =errordotnet_diagnostic.CA2224.severity =nonedotnet_diagnostic.CA2225.severity =nonedotnet_diagnostic.CA2226.severity =nonedotnet_diagnostic.CA2227.severity =warningdotnet_diagnostic.CA2229.severity =nonedotnet_diagnostic.CA2231.severity =warningdotnet_diagnostic.CA2234.severity =warningdotnet_diagnostic.CA2235.severity =warningdotnet_diagnostic.CA2237.severity =warningdotnet_diagnostic.CA2241.severity =errordotnet_diagnostic.CA2242.severity =errordotnet_diagnostic.CA2243.severity =errordotnet_diagnostic.CA2244.severity =errordotnet_diagnostic.CA2245.severity =errordotnet_diagnostic.CA2246.severity =errordotnet_diagnostic.CA2247.severity =warningdotnet_diagnostic.CA2248.severity =errordotnet_diagnostic.CA2249.severity =warningdotnet_diagnostic.CA2250.severity =warningdotnet_diagnostic.CA2251.severity =warningdotnet_diagnostic.CA2252.severity =errordotnet_diagnostic.CA2253.severity =warningdotnet_diagnostic.CA2254.severity =warningdotnet_diagnostic.CA2255.severity =warningdotnet_diagnostic.CA2256.severity =warningdotnet_diagnostic.CA2257.severity =warningdotnet_diagnostic.CA2258.severity =warningdotnet_diagnostic.CA2259.severity =warningdotnet_diagnostic.CA2260.severity =warningdotnet_diagnostic.CA2261.severity =warningdotnet_diagnostic.CA2262.severity =warningdotnet_diagnostic.CA2263.severity =warningdotnet_diagnostic.CA2264.severity =warningdotnet_diagnostic.CA2265.severity =warning

Code style rules

Language rules |using directive preferences

Language rules | Code block preferences

Language rules | Expression-bodied preferences

Language rules | Expression-level preferences

Language rules | Field preferences

Language rules | Modifier preferences

Language rules | New line preferences

Language rules | Null-checking preferences

Language rules | Parameter preferences

Language rules | Parentheses preferences

Language rules | Pattern matching preferences

Language rules |this preferences

Language rules |var preferences

Formatting rules

.editorconfig
dotnet_diagnostic.IDE0055.severity =warning

About

An opinionated C# .editorconfig

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

[8]ページ先頭

©2009-2025 Movatter.jp