-
-
Save MaxTheWhale/fc29e8fb3d8b62777068639591e54df4 to your computer and use it in GitHub Desktop.
C# editor config with all code style and code quality rules, plus StyleCopAnalyzers rules
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This .editorconfig enables all C# code style and code quality warnings, except the following: | |
# CA1032 - A good idea if developing a library, can be annoying otherwise | |
# CA1063 - Unless you use unmanaged resources this is just extra boilerplate | |
# CA2007 - This is only needed for library code | |
# CA1848 - Useful for high performance logging but a nuisance otherwise | |
# CA1506 - Not a helpful warning, and often unavoidable in Program.cs | |
# CA1716 - Probably a good idea if developing a library, but can be annoying otherwise | |
# CA1805 - Can be more readable to be explicit | |
# CA1816 - Only needed if you ever use finalizers | |
# CA1062 - Obsolete when using nullable types (but should probably enable anyway if writing a library) | |
# IDE0055 - This conflicts with CSharpier | |
# IDE0058 - Personal preference, useful if you only deal with pure functions but otherwise annoying | |
# IDE0061, IDE0024, IDE0023, IDE0022 - These are disabled by default as it is non-standard style | |
# IDE0008 - Disabled as it enforces explicit types instead of 'var' | |
# IDE0073 - Enable this if you need a header at the top of every file (e.g. copyright info) | |
# IDE0050 - Personal preference, also obsoleted in VS2022 | |
# IDE0046, IDE0045 - Personal preference, it often makes ugly code | |
# IDE0130 - Disabled due to a crash (https://github.com/dotnet/format/issues/1623) | |
# IDE0290 - Disabled until primary constructors can support readonly properties | |
# SA1122 - Personal preference | |
# All SingleFile warnings, as these are enabled/disabled via the PublishSingleFile option | |
# Most Globalization warnings - turn these on if you are doing internationalisation | |
# StyleCopAnalyzer documentation warnings - turn these on if your code has a public API | |
# StyleCopAnalyzer formatting warnings - these are replaced/conflict with CSharpier | |
# ReSharper warning JoinNullCheckWithUsage (and IDE0270) - Personal preference, it often makes code less readable | |
# ReSharper warning CollectionNeverUpdated.Global - Throws false positives | |
root = true | |
# C# files | |
[*.cs] | |
###################### | |
###################### | |
## Code style rules ## | |
###################### | |
###################### | |
#################### | |
# .NET style rules # | |
#################### | |
# 'this' preferences | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0003-ide0009 | |
dotnet_diagnostic.IDE0003.severity = warning | |
dotnet_diagnostic.IDE0009.severity = warning | |
dotnet_style_qualification_for_field = false | |
dotnet_style_qualification_for_property = false | |
dotnet_style_qualification_for_method = false | |
dotnet_style_qualification_for_event = false | |
# Use language keywords instead of framework type names for type references | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0049 | |
dotnet_diagnostic.IDE0049.severity = warning | |
dotnet_style_predefined_type_for_locals_parameters_members = true | |
dotnet_style_predefined_type_for_member_access = true | |
# Order modifiers | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0036 | |
dotnet_diagnostic.IDE0036.severity = warning | |
# Add accessibility modifiers | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0040 | |
dotnet_diagnostic.IDE0040.severity = warning | |
dotnet_style_require_accessibility_modifiers = for_non_interface_members | |
# Add readonly modifier | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0044 | |
dotnet_diagnostic.IDE0044.severity = warning | |
dotnet_style_readonly_field = true | |
# Parentheses preferences | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0047-ide0048 | |
dotnet_diagnostic.IDE0047.severity = warning | |
dotnet_diagnostic.IDE0047.severity = warning | |
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity | |
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity | |
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity | |
dotnet_style_parentheses_in_other_operators = never_if_unnecessary | |
# Use object initializers | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0017 | |
dotnet_diagnostic.IDE0017.severity = warning | |
dotnet_style_object_initializer = true | |
# Use collection initializers | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0028 | |
dotnet_diagnostic.IDE0028.severity = warning | |
dotnet_style_collection_initializer = true | |
# Use auto-implemented property | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0032 | |
dotnet_diagnostic.IDE0032.severity = warning | |
dotnet_style_prefer_auto_properties = true | |
# Use explicitly provided tuple name | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0033 | |
dotnet_diagnostic.IDE0033.severity = warning | |
dotnet_style_explicit_tuple_names = true | |
# Use inferred member names | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0037 | |
dotnet_diagnostic.IDE0037.severity = warning | |
dotnet_style_prefer_inferred_tuple_names = true | |
dotnet_style_prefer_inferred_anonymous_type_member_names = true | |
# Use conditional expression for assignment | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0045 | |
dotnet_diagnostic.IDE0045.severity = none | |
# Use conditional expression for return | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0046 | |
dotnet_diagnostic.IDE0046.severity = none | |
# Use compound assignment | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0054-ide0074 | |
dotnet_diagnostic.IDE0054.severity = warning | |
dotnet_diagnostic.IDE0074.severity = warning | |
dotnet_style_prefer_compound_assignment = true | |
# Simplify interpolation | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0071 | |
dotnet_diagnostic.IDE0071.severity = warning | |
dotnet_style_prefer_simplified_interpolation = true | |
# Simplify conditional expression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0075 | |
dotnet_diagnostic.IDE0075.severity = warning | |
dotnet_style_prefer_simplified_boolean_expressions = true | |
# Add missing cases to switch statement | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0010 | |
dotnet_diagnostic.IDE0010.severity = warning | |
# Convert anonymous type to tuple | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0050 | |
dotnet_diagnostic.IDE0050.severity = none | |
# Use 'System.HashCode.Combine' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0070 | |
dotnet_diagnostic.IDE0070.severity = warning | |
# Convert 'typeof' to 'nameof' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0082 | |
dotnet_diagnostic.IDE0082.severity = warning | |
# Null check can be simplified | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0029-ide0030-ide0270 | |
dotnet_diagnostic.IDE0029.severity = warning | |
dotnet_diagnostic.IDE0030.severity = warning | |
dotnet_diagnostic.IDE0270.severity = none # Disabled due to poorer readability | |
dotnet_style_coalesce_expression = true | |
# Use null propagation | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0031 | |
dotnet_diagnostic.IDE0031.severity = warning | |
dotnet_style_null_propagation = true | |
# Use 'is null' check | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0041 | |
dotnet_diagnostic.IDE0041.severity = warning | |
dotnet_style_prefer_is_null_check_over_reference_equality_method = true | |
# Require file header | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0073 | |
dotnet_diagnostic.IDE0073.severity = none | |
# Namespace does not match folder structure | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0130 | |
dotnet_diagnostic.IDE0130.severity = none # Disabling due to this issue: https://github.com/dotnet/format/issues/1623 | |
dotnet_style_namespace_match_folder = true | |
################## | |
# C# style rules # | |
################## | |
# 'var' preferences | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0007-ide0008 | |
dotnet_diagnostic.IDE0007.severity = warning | |
dotnet_diagnostic.IDE0008.severity = none | |
csharp_style_var_for_built_in_types = true | |
csharp_style_var_when_type_is_apparent = true | |
csharp_style_var_elsewhere = true | |
# Use expression body for constructors | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0021 | |
dotnet_diagnostic.IDE0021.severity = warning | |
csharp_style_expression_bodied_constructors = false | |
# Use expression body for methods | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0022 | |
dotnet_diagnostic.IDE0022.severity = none | |
# Use expression body for operators | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0023-ide0024 | |
dotnet_diagnostic.IDE0023.severity = none | |
dotnet_diagnostic.IDE0024.severity = none | |
# Use expression body for properties | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0025 | |
dotnet_diagnostic.IDE0025.severity = warning | |
csharp_style_expression_bodied_properties = true | |
# Use expression body for indexers | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0026 | |
dotnet_diagnostic.IDE0026.severity = warning | |
csharp_style_expression_bodied_indexers = true | |
# Use expression body for accessors | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0027 | |
dotnet_diagnostic.IDE0027.severity = warning | |
csharp_style_expression_bodied_accessors = true | |
# Use expression body for lambdas | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0053 | |
dotnet_diagnostic.IDE0053.severity = warning | |
csharp_style_expression_bodied_lambdas = true | |
# Use expression body for local functions | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0061 | |
dotnet_diagnostic.IDE0061.severity = none | |
# Use pattern matching to avoid 'as' followed by a 'null' check | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0019 | |
dotnet_diagnostic.IDE0019.severity = warning | |
csharp_style_pattern_matching_over_as_with_null_check = true | |
# Use pattern matching to avoid 'is' check followed by a cast | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0020-ide0038 | |
dotnet_diagnostic.IDE0020.severity = warning | |
dotnet_diagnostic.IDE0038.severity = warning | |
csharp_style_pattern_matching_over_is_with_cast_check = true | |
# Use switch expression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0066 | |
dotnet_diagnostic.IDE0066.severity = warning | |
csharp_style_prefer_switch_expression = true | |
# Use pattern matching | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0078-ide0260 | |
dotnet_diagnostic.IDE0078.severity = warning | |
dotnet_diagnostic.IDE0260.severity = warning | |
csharp_style_prefer_pattern_matching = true | |
# Use pattern matching ('not' operator) | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0083 | |
dotnet_diagnostic.IDE0083.severity = warning | |
csharp_style_prefer_not_pattern = true | |
# Simplify property pattern | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0170 | |
dotnet_diagnostic.IDE0170.severity = warning | |
csharp_style_prefer_extended_property_pattern = true | |
# Inline variable declaration | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0018 | |
dotnet_diagnostic.IDE0018.severity = warning | |
csharp_style_inlined_variable_declaration = true | |
# Simplify 'default' expression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0034 | |
dotnet_diagnostic.IDE0034.severity = warning | |
csharp_prefer_simple_default_expression = true | |
# Use local function instead of lambda | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0039 | |
dotnet_diagnostic.IDE0039.severity = warning | |
csharp_style_prefer_local_over_anonymous_function = true | |
# Deconstruct variable declaration | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0042 | |
dotnet_diagnostic.IDE0042.severity = warning | |
csharp_style_deconstructed_variable_declaration = true | |
# Use index operator | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0056 | |
dotnet_diagnostic.IDE0056.severity = warning | |
csharp_style_prefer_index_operator = true | |
# Use range operator | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0057 | |
dotnet_diagnostic.IDE0057.severity = warning | |
csharp_style_prefer_range_operator = true | |
# Simplify 'new' expression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0090 | |
dotnet_diagnostic.IDE0090.severity = warning | |
csharp_style_implicit_object_creation_when_type_is_apparent = true | |
# Add missing cases to switch expression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0072 | |
dotnet_diagnostic.IDE0072.severity = warning | |
# Use tuple to swap values | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0180 | |
dotnet_diagnostic.IDE0180.severity = warning | |
csharp_style_prefer_tuple_swap = true | |
# Use throw expression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0016 | |
dotnet_diagnostic.IDE0016.severity = warning | |
csharp_style_throw_expression = false | |
# Use conditional delegate call | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide1005 | |
dotnet_diagnostic.IDE1005.severity = warning | |
csharp_style_conditional_delegate_call = true | |
# Prefer 'null' check over type check | |
dotnet_diagnostic.IDE0150.severity = warning | |
csharp_style_prefer_null_check_over_type_check = true | |
# Add braces | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0011 | |
dotnet_diagnostic.IDE0011.severity = warning | |
csharp_prefer_braces = true | |
# Use simple 'using' statement | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0063 | |
dotnet_diagnostic.IDE0063.severity = warning | |
csharp_prefer_simple_using_statement = true | |
# 'using' directive placement | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0065 | |
dotnet_diagnostic.IDE0065.severity = warning | |
csharp_using_directive_placement = outside_namespace | |
# Make local function static | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0062 | |
dotnet_diagnostic.IDE0062.severity = warning | |
csharp_prefer_static_local_function = true | |
# Make struct fields writable | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0064 | |
dotnet_diagnostic.IDE0064.severity = warning | |
# Namespace declaration preferences | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0160-ide0161 | |
dotnet_diagnostic.IDE0160.severity = warning | |
dotnet_diagnostic.IDE0161.severity = warning | |
csharp_style_namespace_declarations = file_scoped | |
# Remove unnecessary lambda expression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0200 | |
dotnet_diagnostic.IDE0200.severity = warning | |
# Convert to top-level statements | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0210 | |
# Convert to 'Program.Main' style program | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0211 | |
dotnet_diagnostic.IDE0210.severity = warning | |
dotnet_diagnostic.IDE0211.severity = warning | |
csharp_style_prefer_top_level_statements = true | |
# Add explicit cast in foreach loop | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0220 | |
dotnet_diagnostic.IDE0220.severity = warning | |
# Use UTF-8 string literal | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0230 | |
dotnet_diagnostic.IDE0230.severity = warning | |
# Use 'nameof' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0280 | |
dotnet_diagnostic.IDE0280.severity = warning | |
# Use primary constructor | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0290 | |
dotnet_diagnostic.IDE0290.severity = none # Disabling until readonly properties are supported | |
########################## | |
# Unnecessary code rules # | |
########################## | |
# Simplify name | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0001 | |
dotnet_diagnostic.IDE0001.severity = warning | |
# Simplify member access | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0002 | |
dotnet_diagnostic.IDE0002.severity = warning | |
# Remove unnecessary cast | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0004 | |
dotnet_diagnostic.IDE0004.severity = warning | |
# Remove unnecessary using directives | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0005 | |
dotnet_diagnostic.IDE0005.severity = warning | |
# Remove unreachable code | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0035 | |
dotnet_diagnostic.IDE0035.severity = warning | |
# Remove unused private member | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0051 | |
dotnet_diagnostic.IDE0051.severity = warning | |
# Remove unread private member | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0052 | |
dotnet_diagnostic.IDE0052.severity = warning | |
# Remove unnecessary expression value | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0058 | |
dotnet_diagnostic.IDE0058.severity = none | |
# Remove unnecessary value assignment | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0059 | |
dotnet_diagnostic.IDE0059.severity = warning | |
# Remove unused parameter | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0060 | |
dotnet_diagnostic.IDE0060.severity = warning | |
dotnet_code_quality_unused_parameters = all | |
# Remove unnecessary suppression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0079 | |
dotnet_diagnostic.IDE0079.severity = warning | |
# Remove unnecessary suppression operator | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0080 | |
dotnet_diagnostic.IDE0080.severity = warning | |
# Remove unnecessary equality operator | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0100 | |
dotnet_diagnostic.IDE0100.severity = warning | |
# Remove unnecessary discard | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0110 | |
dotnet_diagnostic.IDE0110.severity = warning | |
# Simplify LINQ expression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0120 | |
dotnet_diagnostic.IDE0120.severity = warning | |
# Nullable directive is redundant | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0240 | |
dotnet_diagnostic.IDE0240.severity = warning | |
# Nullable directive is unnecessary | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0241 | |
dotnet_diagnostic.IDE0241.severity = warning | |
# Struct can be made 'readonly' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0250 | |
dotnet_diagnostic.IDE0250.severity = warning | |
# Member can be made 'readonly' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0251 | |
dotnet_diagnostic.IDE0251.severity = warning | |
#################### | |
# Formatting rules # | |
#################### | |
# Formatting rule | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0055 | |
dotnet_diagnostic.IDE0055.severity = none # CSharpier conflict | |
# .NET formatting options | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/dotnet-formatting-options | |
# These are left commented out because they conflict with CSharpier import sorting | |
# dotnet_sort_system_directives_first = true | |
# dotnet_separate_import_directive_groups = true | |
# C# formatting options | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/csharp-formatting-options | |
# New-line options | |
csharp_new_line_before_open_brace = all | |
csharp_new_line_before_else = true | |
csharp_new_line_before_catch = true | |
csharp_new_line_before_finally = true | |
csharp_new_line_before_members_in_object_initializers = true | |
csharp_new_line_before_members_in_anonymous_types = true | |
csharp_new_line_between_query_expression_clauses = true | |
# Indentation options | |
csharp_indent_case_contents = true | |
csharp_indent_switch_labels = true | |
csharp_indent_labels = one_less_than_current | |
csharp_indent_block_contents = true | |
csharp_indent_braces = false | |
csharp_indent_case_contents_when_block = false | |
# Spacing options | |
csharp_space_after_cast = false | |
csharp_space_after_keywords_in_control_flow_statements = true | |
csharp_space_before_colon_in_inheritance_clause = true | |
csharp_space_after_colon_in_inheritance_clause = true | |
csharp_space_around_binary_operators = before_and_after | |
csharp_space_between_method_declaration_parameter_list_parentheses = false | |
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false | |
csharp_space_between_method_declaration_name_and_open_parenthesis = false | |
csharp_space_between_method_call_parameter_list_parentheses = false | |
csharp_space_between_method_call_empty_parameter_list_parentheses = false | |
csharp_space_between_method_call_name_and_opening_parenthesis = false | |
csharp_space_after_comma = true | |
csharp_space_before_comma = false | |
csharp_space_after_dot = false | |
csharp_space_before_dot = false | |
csharp_space_after_semicolon_in_for_statement = true | |
csharp_space_before_semicolon_in_for_statement = false | |
csharp_space_around_declaration_statements = false | |
csharp_space_before_open_square_brackets = false | |
csharp_space_between_empty_square_brackets = false | |
csharp_space_between_square_brackets = false | |
# Wrap options | |
csharp_preserve_single_line_statements = true | |
csharp_preserve_single_line_blocks = true | |
################ | |
# Naming rules # | |
################ | |
# Naming rule | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/naming-rules | |
dotnet_diagnostic.IDE1006.severity = warning | |
# Naming rules | |
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.symbols = types_and_namespaces | |
dotnet_naming_rule.types_and_namespaces_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.interfaces_should_be_ipascalcase.severity = warning | |
dotnet_naming_rule.interfaces_should_be_ipascalcase.symbols = interfaces | |
dotnet_naming_rule.interfaces_should_be_ipascalcase.style = ipascalcase | |
dotnet_naming_rule.type_parameters_should_be_tpascalcase.severity = warning | |
dotnet_naming_rule.type_parameters_should_be_tpascalcase.symbols = type_parameters | |
dotnet_naming_rule.type_parameters_should_be_tpascalcase.style = tpascalcase | |
dotnet_naming_rule.methods_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.methods_should_be_pascalcase.symbols = methods | |
dotnet_naming_rule.methods_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.properties_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.properties_should_be_pascalcase.symbols = properties | |
dotnet_naming_rule.properties_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.events_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.events_should_be_pascalcase.symbols = events | |
dotnet_naming_rule.events_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.local_variables_should_be_camelcase.severity = warning | |
dotnet_naming_rule.local_variables_should_be_camelcase.symbols = local_variables | |
dotnet_naming_rule.local_variables_should_be_camelcase.style = camelcase | |
dotnet_naming_rule.local_constants_should_be_camelcase.severity = warning | |
dotnet_naming_rule.local_constants_should_be_camelcase.symbols = local_constants | |
dotnet_naming_rule.local_constants_should_be_camelcase.style = camelcase | |
dotnet_naming_rule.parameters_should_be_camelcase.severity = warning | |
dotnet_naming_rule.parameters_should_be_camelcase.symbols = parameters | |
dotnet_naming_rule.parameters_should_be_camelcase.style = camelcase | |
dotnet_naming_rule.public_fields_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.public_fields_should_be_pascalcase.symbols = public_fields | |
dotnet_naming_rule.public_fields_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.private_fields_should_be__camelcase.severity = warning | |
dotnet_naming_rule.private_fields_should_be__camelcase.symbols = private_fields | |
dotnet_naming_rule.private_fields_should_be__camelcase.style = _camelcase | |
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.severity = warning | |
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.symbols = private_static_fields | |
dotnet_naming_rule.private_static_fields_should_be_s_camelcase.style = s_camelcase | |
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.symbols = public_constant_fields | |
dotnet_naming_rule.public_constant_fields_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.symbols = private_constant_fields | |
dotnet_naming_rule.private_constant_fields_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.symbols = public_static_readonly_fields | |
dotnet_naming_rule.public_static_readonly_fields_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.symbols = private_static_readonly_fields | |
dotnet_naming_rule.private_static_readonly_fields_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.enums_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.enums_should_be_pascalcase.symbols = enums | |
dotnet_naming_rule.enums_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.local_functions_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.local_functions_should_be_pascalcase.symbols = local_functions | |
dotnet_naming_rule.local_functions_should_be_pascalcase.style = pascalcase | |
dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = warning | |
dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members | |
dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase | |
# Symbol specifications | |
dotnet_naming_symbols.interfaces.applicable_kinds = interface | |
dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.interfaces.required_modifiers = | |
dotnet_naming_symbols.enums.applicable_kinds = enum | |
dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.enums.required_modifiers = | |
dotnet_naming_symbols.events.applicable_kinds = event | |
dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.events.required_modifiers = | |
dotnet_naming_symbols.methods.applicable_kinds = method | |
dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.methods.required_modifiers = | |
dotnet_naming_symbols.properties.applicable_kinds = property | |
dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.properties.required_modifiers = | |
dotnet_naming_symbols.public_fields.applicable_kinds = field | |
dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal | |
dotnet_naming_symbols.public_fields.required_modifiers = | |
dotnet_naming_symbols.private_fields.applicable_kinds = field | |
dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.private_fields.required_modifiers = | |
dotnet_naming_symbols.private_static_fields.applicable_kinds = field | |
dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.private_static_fields.required_modifiers = static | |
dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum | |
dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.types_and_namespaces.required_modifiers = | |
dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method | |
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.non_field_members.required_modifiers = | |
dotnet_naming_symbols.type_parameters.applicable_kinds = namespace | |
dotnet_naming_symbols.type_parameters.applicable_accessibilities = * | |
dotnet_naming_symbols.type_parameters.required_modifiers = | |
dotnet_naming_symbols.private_constant_fields.applicable_kinds = field | |
dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.private_constant_fields.required_modifiers = const | |
dotnet_naming_symbols.local_variables.applicable_kinds = local | |
dotnet_naming_symbols.local_variables.applicable_accessibilities = local | |
dotnet_naming_symbols.local_variables.required_modifiers = | |
dotnet_naming_symbols.local_constants.applicable_kinds = local | |
dotnet_naming_symbols.local_constants.applicable_accessibilities = local | |
dotnet_naming_symbols.local_constants.required_modifiers = const | |
dotnet_naming_symbols.parameters.applicable_kinds = parameter | |
dotnet_naming_symbols.parameters.applicable_accessibilities = * | |
dotnet_naming_symbols.parameters.required_modifiers = | |
dotnet_naming_symbols.public_constant_fields.applicable_kinds = field | |
dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal | |
dotnet_naming_symbols.public_constant_fields.required_modifiers = const | |
dotnet_naming_symbols.public_static_readonly_fields.applicable_kinds = field | |
dotnet_naming_symbols.public_static_readonly_fields.applicable_accessibilities = public, internal | |
dotnet_naming_symbols.public_static_readonly_fields.required_modifiers = readonly, static | |
dotnet_naming_symbols.private_static_readonly_fields.applicable_kinds = field | |
dotnet_naming_symbols.private_static_readonly_fields.applicable_accessibilities = private, protected, protected_internal, private_protected | |
dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readonly, static | |
dotnet_naming_symbols.local_functions.applicable_kinds = local_function | |
dotnet_naming_symbols.local_functions.applicable_accessibilities = * | |
dotnet_naming_symbols.local_functions.required_modifiers = | |
# Naming styles | |
dotnet_naming_style.pascalcase.required_prefix = | |
dotnet_naming_style.pascalcase.required_suffix = | |
dotnet_naming_style.pascalcase.word_separator = | |
dotnet_naming_style.pascalcase.capitalization = pascal_case | |
dotnet_naming_style.ipascalcase.required_prefix = I | |
dotnet_naming_style.ipascalcase.required_suffix = | |
dotnet_naming_style.ipascalcase.word_separator = | |
dotnet_naming_style.ipascalcase.capitalization = pascal_case | |
dotnet_naming_style.tpascalcase.required_prefix = T | |
dotnet_naming_style.tpascalcase.required_suffix = | |
dotnet_naming_style.tpascalcase.word_separator = | |
dotnet_naming_style.tpascalcase.capitalization = pascal_case | |
dotnet_naming_style._camelcase.required_prefix = _ | |
dotnet_naming_style._camelcase.required_suffix = | |
dotnet_naming_style._camelcase.word_separator = | |
dotnet_naming_style._camelcase.capitalization = camel_case | |
dotnet_naming_style.camelcase.required_prefix = | |
dotnet_naming_style.camelcase.required_suffix = | |
dotnet_naming_style.camelcase.word_separator = | |
dotnet_naming_style.camelcase.capitalization = camel_case | |
dotnet_naming_style.s_camelcase.required_prefix = s_ | |
dotnet_naming_style.s_camelcase.required_suffix = | |
dotnet_naming_style.s_camelcase.word_separator = | |
dotnet_naming_style.s_camelcase.capitalization = camel_case | |
####################### | |
# Miscellaneous rules # | |
####################### | |
# Remove invalid global 'SuppressMessageAttribute' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0076 | |
dotnet_diagnostic.IDE0076.severity = warning | |
# Avoid legacy format target in global 'SuppressMessageAttribute' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/ide0077 | |
dotnet_diagnostic.IDE0077.severity = warning | |
######################## | |
######################## | |
## Code quality rules ## | |
######################## | |
######################## | |
################ | |
# Design rules # | |
################ | |
# Do not declare static members on generic types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1000 | |
dotnet_diagnostic.CA1000.severity = warning | |
# Types that own disposable fields should be disposable | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1001 | |
dotnet_diagnostic.CA1001.severity = warning | |
# Do not expose generic lists | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1002 | |
dotnet_diagnostic.CA1002.severity = warning | |
# Use generic event handler instances | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1003 | |
dotnet_diagnostic.CA1003.severity = warning | |
# Avoid excessive parameters on generic types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1005 | |
dotnet_diagnostic.CA1005.severity = warning | |
# Enums should have zero value | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1008 | |
dotnet_diagnostic.CA1008.severity = warning | |
# Collections should implement generic interface | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1010 | |
dotnet_diagnostic.CA1010.severity = warning | |
# Abstract types should not have public constructors | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1012 | |
dotnet_diagnostic.CA1012.severity = warning | |
# Mark assemblies with CLSCompliantAttribute | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1014 | |
dotnet_diagnostic.CA1014.severity = warning | |
# Mark assemblies with AssemblyVersionAttribute | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1016 | |
dotnet_diagnostic.CA1016.severity = warning | |
# Mark assemblies with ComVisibleAttribute | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1017 | |
dotnet_diagnostic.CA1017.severity = warning | |
# Mark attributes with AttributeUsageAttribute | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1018 | |
dotnet_diagnostic.CA1018.severity = warning | |
# Define accessors for attribute arguments | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1019 | |
dotnet_diagnostic.CA1019.severity = warning | |
# Avoid out parameters | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1021 | |
dotnet_diagnostic.CA1021.severity = warning | |
# Use properties where appropriate | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1024 | |
dotnet_diagnostic.CA1024.severity = warning | |
# Mark enums with FlagsAttribute | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1027 | |
dotnet_diagnostic.CA1027.severity = warning | |
# Enum storage should be Int32 | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1028 | |
dotnet_diagnostic.CA1028.severity = warning | |
# Use events where appropriate | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1030 | |
dotnet_diagnostic.CA1030.severity = warning | |
# Do not catch general exception types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1031 | |
dotnet_diagnostic.CA1031.severity = warning | |
# Implement standard exception constructors | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1032 | |
dotnet_diagnostic.CA1032.severity = none # A good idea if developing a libary, can be annoying otherwise | |
# Interface methods should be callable by child types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1033 | |
dotnet_diagnostic.CA1033.severity = warning | |
# Nested types should not be visible | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1034 | |
dotnet_diagnostic.CA1034.severity = warning | |
# Override methods on comparable types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1036 | |
dotnet_diagnostic.CA1036.severity = warning | |
# Avoid empty interfaces | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1040 | |
dotnet_diagnostic.CA1040.severity = warning | |
# Provide ObsoleteAttribute message | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1041 | |
dotnet_diagnostic.CA1041.severity = warning | |
# Use integral or string argument for indexers | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1043 | |
dotnet_diagnostic.CA1043.severity = warning | |
# Properties should not be write only | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1044 | |
dotnet_diagnostic.CA1044.severity = warning | |
# Do not pass types by reference | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1045 | |
dotnet_diagnostic.CA1045.severity = warning | |
# Do not overload operator equals on reference types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1046 | |
dotnet_diagnostic.CA1046.severity = warning | |
# Do not declare protected members in sealed types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1047 | |
dotnet_diagnostic.CA1047.severity = warning | |
# Declare types in namespaces | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1050 | |
dotnet_diagnostic.CA1050.severity = warning | |
# Do not declare visible instance fields | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1051 | |
dotnet_diagnostic.CA1051.severity = warning | |
# Static holder types should be Static or NotInheritable | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1052 | |
dotnet_diagnostic.CA1052.severity = warning | |
# Static holder types should not have default constructors | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1053 | |
dotnet_diagnostic.CA1053.severity = warning | |
# URI parameters should not be strings | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1054 | |
dotnet_diagnostic.CA1054.severity = warning | |
# URI return values should not be strings | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1055 | |
dotnet_diagnostic.CA1055.severity = warning | |
# URI properties should not be strings | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1056 | |
dotnet_diagnostic.CA1056.severity = warning | |
# Types should not extend certain base types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1058 | |
dotnet_diagnostic.CA1058.severity = warning | |
# Move P/Invokes to NativeMethods class | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1060 | |
dotnet_diagnostic.CA1060.severity = warning | |
# Do not hide base class methods | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1061 | |
dotnet_diagnostic.CA1061.severity = warning | |
# Validate arguments of public methods | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1062 | |
dotnet_diagnostic.CA1062.severity = none | |
# Implement IDisposable correctly | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1063 | |
dotnet_diagnostic.CA1063.severity = none # Unless you use unmanaged resources this is just extra boilerplate | |
# Exceptions should be public | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1064 | |
dotnet_diagnostic.CA1064.severity = warning | |
# Do not raise exceptions in unexpected locations | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1065 | |
dotnet_diagnostic.CA1065.severity = warning | |
# Implement IEquatable when overriding Equals | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1066 | |
dotnet_diagnostic.CA1066.severity = warning | |
# Override Equals when implementing IEquatable | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1067 | |
dotnet_diagnostic.CA1067.severity = warning | |
# CancellationToken parameters must come last | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1068 | |
dotnet_diagnostic.CA1068.severity = warning | |
# Enums should not have duplicate values | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1069 | |
dotnet_diagnostic.CA1069.severity = warning | |
# Do not declare event fields as virtual | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1070 | |
dotnet_diagnostic.CA1070.severity = warning | |
####################### | |
# Documentation rules # | |
####################### | |
# Avoid using cref tags with a prefix | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1200 | |
dotnet_diagnostic.CA1200.severity = warning | |
####################### | |
# Globalization rules # | |
####################### | |
# Do not pass literals as localized parameters | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1303 | |
dotnet_diagnostic.CA1303.severity = none | |
# Specify CultureInfo | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1304 | |
dotnet_diagnostic.CA1304.severity = none | |
# Specify IFormatProvider | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1305 | |
dotnet_diagnostic.CA1305.severity = none | |
# Specify StringComparison for clarity | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1307 | |
dotnet_diagnostic.CA1307.severity = none | |
# Normalize strings to uppercase | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1308 | |
dotnet_diagnostic.CA1308.severity = none | |
# Use ordinal StringComparison | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1309 | |
dotnet_diagnostic.CA1309.severity = warning | |
# Specify StringComparison for correctness | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1310 | |
dotnet_diagnostic.CA1310.severity = none | |
# Specify a culture or use an invariant version | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1311 | |
dotnet_diagnostic.CA1311.severity = none | |
# CA2101: Specify marshalling for P/Invoke string arguments | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2101 | |
dotnet_diagnostic.CA2101.severity = none | |
########################################## | |
# Portability and interoperability rules # | |
########################################## | |
# P/Invokes should not be visible | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1401 | |
dotnet_diagnostic.CA1401.severity = warning | |
# Validate platform compatibility | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1416 | |
dotnet_diagnostic.CA1416.severity = warning | |
# Do not use 'OutAttribute' on string parameters for P/Invokes | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1417 | |
dotnet_diagnostic.CA1417.severity = warning | |
# Validate platform compatibility | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1418 | |
dotnet_diagnostic.CA1418.severity = warning | |
# Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1419 | |
dotnet_diagnostic.CA1419.severity = warning | |
# Property, type, or attribute requires runtime marshalling | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1420 | |
dotnet_diagnostic.CA1420.severity = warning | |
# Method uses runtime marshalling when DisableRuntimeMarshallingAttribute is applied | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1421 | |
dotnet_diagnostic.CA1421.severity = warning | |
# Validate platform compatibility - obsoleted APIs | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1422 | |
dotnet_diagnostic.CA1422.severity = warning | |
######################### | |
# Maintainability rules # | |
######################### | |
# Avoid excessive inheritance | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1501 | |
dotnet_diagnostic.CA1501.severity = warning | |
# Avoid excessive complexity | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1502 | |
dotnet_diagnostic.CA1502.severity = warning | |
# Avoid unmaintainable code | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1505 | |
dotnet_diagnostic.CA1505.severity = warning | |
# Avoid excessive class coupling | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1506 | |
dotnet_diagnostic.CA1506.severity = none | |
# Use 'nameof' in place of string | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1507 | |
dotnet_diagnostic.CA1507.severity = warning | |
# Avoid dead conditional code | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1508 | |
dotnet_diagnostic.CA1508.severity = warning | |
# Invalid entry in code metrics configuration file | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1509 | |
dotnet_diagnostic.CA1509.severity = warning | |
# Avoid redundant length argument | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1514 | |
dotnet_diagnostic.CA1514.severity = warning | |
################ | |
# Naming rules # | |
################ | |
# Do not name enum values 'Reserved' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1700 | |
dotnet_diagnostic.CA1700.severity = warning | |
# Identifiers should not contain underscores | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1707 | |
dotnet_diagnostic.CA1707.severity = warning | |
# Identifiers should differ by more than case | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1708 | |
dotnet_diagnostic.CA1708.severity = warning | |
# Identifiers should have correct suffix | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1710 | |
dotnet_diagnostic.CA1710.severity = warning | |
# Identifiers should not have incorrect suffix | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1711 | |
dotnet_diagnostic.CA1711.severity = warning | |
# Do not prefix enum values with type name | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1712 | |
dotnet_diagnostic.CA1712.severity = warning | |
# Events should not have before or after prefix | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1713 | |
dotnet_diagnostic.CA1713.severity = warning | |
# Flags enums should have plural names | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1714 | |
dotnet_diagnostic.CA1714.severity = warning | |
# Identifiers should have correct prefix | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1715 | |
dotnet_diagnostic.CA1715.severity = warning | |
# Identifiers should not match keywords | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1716 | |
dotnet_diagnostic.CA1716.severity = none | |
# Only FlagsAttribute enums should have plural names | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1717 | |
dotnet_diagnostic.CA1717.severity = warning | |
# Identifiers should not contain type names | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1720 | |
dotnet_diagnostic.CA1720.severity = warning | |
# Property names should not match get methods | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1721 | |
dotnet_diagnostic.CA1721.severity = warning | |
# Type names should not match namespaces | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1724 | |
dotnet_diagnostic.CA1724.severity = warning | |
# Parameter names should match base declaration | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1725 | |
dotnet_diagnostic.CA1725.severity = warning | |
# Use PascalCase for named placeholders | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1727 | |
dotnet_diagnostic.CA1727.severity = warning | |
##################### | |
# Performance rules # | |
##################### | |
# Use Literals Where Appropriate | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1802 | |
dotnet_diagnostic.CA1802.severity = warning | |
# Do not initialize unnecessarily | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1805 | |
dotnet_diagnostic.CA1805.severity = none # often more readable to explicitly assign | |
# Do not ignore method results | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1806 | |
dotnet_diagnostic.CA1806.severity = warning | |
# Initialize reference type static fields inline | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1810 | |
dotnet_diagnostic.CA1810.severity = warning | |
# Avoid uninstantiated internal classes | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1812 | |
dotnet_diagnostic.CA1812.severity = warning | |
# Avoid unsealed attributes | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1813 | |
dotnet_diagnostic.CA1813.severity = warning | |
# Prefer jagged arrays over multidimensional | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1814 | |
dotnet_diagnostic.CA1814.severity = warning | |
# Override equals and operator equals on value types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1815 | |
dotnet_diagnostic.CA1815.severity = warning | |
# Properties should not return arrays | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1819 | |
dotnet_diagnostic.CA1819.severity = warning | |
# Test for empty strings using string length | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1820 | |
dotnet_diagnostic.CA1820.severity = warning | |
# Remove empty finalizers | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1821 | |
dotnet_diagnostic.CA1821.severity = warning | |
# Mark members as static | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1822 | |
dotnet_diagnostic.CA1822.severity = warning | |
# Avoid unused private fields | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1823 | |
dotnet_diagnostic.CA1823.severity = warning | |
# Mark assemblies with NeutralResourcesLanguageAttribute | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1824 | |
dotnet_diagnostic.CA1824.severity = warning | |
# Avoid zero-length array allocations | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1825 | |
dotnet_diagnostic.CA1825.severity = warning | |
# Use property instead of Linq Enumerable method | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1826 | |
dotnet_diagnostic.CA1826.severity = warning | |
# Do not use Count/LongCount when Any can be used | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1827 | |
dotnet_diagnostic.CA1827.severity = warning | |
# Do not use CountAsync/LongCountAsync when AnyAsync can be used | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1828 | |
dotnet_diagnostic.CA1828.severity = warning | |
# Use Length/Count property instead of Enumerable.Count method | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1829 | |
dotnet_diagnostic.CA1829.severity = warning | |
# Prefer strongly-typed Append and Insert method overloads on StringBuilder | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1830 | |
dotnet_diagnostic.CA1830.severity = warning | |
# Use AsSpan instead of Range-based indexers for string when appropriate | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1831 | |
dotnet_diagnostic.CA1831.severity = warning | |
# Use AsSpan or AsMemory instead of Range-based indexers for getting ReadOnlySpan or ReadOnlyMemory portion of an array | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1832 | |
dotnet_diagnostic.CA1832.severity = warning | |
# Use AsSpan or AsMemory instead of Range-based indexers for getting Span or Memory portion of an array | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1833 | |
dotnet_diagnostic.CA1833.severity = warning | |
# Use StringBuilder.Append(char) for single character strings | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1834 | |
dotnet_diagnostic.CA1834.severity = warning | |
# Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1835 | |
dotnet_diagnostic.CA1835.severity = warning | |
# Prefer IsEmpty over Count when available | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1836 | |
dotnet_diagnostic.CA1836.severity = warning | |
# Use Environment.ProcessId instead of Process.GetCurrentProcess().Id | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1837 | |
dotnet_diagnostic.CA1837.severity = warning | |
# Avoid StringBuilder parameters for P/Invokes | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1838 | |
dotnet_diagnostic.CA1838.severity = warning | |
# Use Environment.ProcessPath instead of Process.GetCurrentProcess().MainModule.FileName | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1839 | |
dotnet_diagnostic.CA1839.severity = warning | |
# Use Environment.CurrentManagedThreadId instead of Thread.CurrentThread.ManagedThreadId | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1840 | |
dotnet_diagnostic.CA1840.severity = warning | |
# Prefer Dictionary Contains methods | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1841 | |
dotnet_diagnostic.CA1841.severity = warning | |
# Do not use 'WhenAll' with a single task | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1842 | |
dotnet_diagnostic.CA1842.severity = warning | |
# Do not use 'WaitAll' with a single task | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1843 | |
dotnet_diagnostic.CA1843.severity = warning | |
# Provide memory-based overrides of async methods when subclassing 'Stream' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1844 | |
dotnet_diagnostic.CA1844.severity = warning | |
# Use span-based 'string.Concat' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1845 | |
dotnet_diagnostic.CA1845.severity = warning | |
# Prefer AsSpan over Substring | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1846 | |
dotnet_diagnostic.CA1846.severity = warning | |
# Use string.Contains(char) instead of string.Contains(string) with single characters | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1847 | |
dotnet_diagnostic.CA1847.severity = warning | |
# Use the LoggerMessage delegates | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1848 | |
dotnet_diagnostic.CA1848.severity = none | |
# Call async methods when in an async method | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1849 | |
dotnet_diagnostic.CA1849.severity = warning | |
# Prefer static HashData method over ComputeHash | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1850 | |
dotnet_diagnostic.CA1850.severity = warning | |
# Possible multiple enumerations of IEnumerable collection | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1851 | |
dotnet_diagnostic.CA1851.severity = warning | |
# Seal internal types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1852 | |
dotnet_diagnostic.CA1852.severity = warning | |
# Unnecessary call to 'Dictionary.ContainsKey(key)' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1853 | |
dotnet_diagnostic.CA1853.severity = warning | |
# Prefer the 'IDictionary.TryGetValue(TKey, out TValue)' method | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1854 | |
dotnet_diagnostic.CA1854.severity = warning | |
# Use Span<T>.Clear() instead of Span<T>.Fill() | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1855 | |
dotnet_diagnostic.CA1855.severity = warning | |
# Use StartsWith instead of IndexOf | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1858 | |
dotnet_diagnostic.CA1858.severity = warning | |
# Use concrete types when possible for improved performance | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1859 | |
dotnet_diagnostic.CA1859.severity = warning | |
# Avoid using 'Enumerable.Any()' extension method | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1860 | |
dotnet_diagnostic.CA1860.severity = warning | |
# Avoid constant arrays as arguments | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1861 | |
dotnet_diagnostic.CA1861.severity = warning | |
# Prefer the 'IDictionary.TryAdd(TKey, TValue)' method | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1864 | |
dotnet_diagnostic.CA1864.severity = warning | |
# Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1865-ca1867 | |
dotnet_diagnostic.CA1865.severity = warning | |
dotnet_diagnostic.CA1866.severity = warning | |
dotnet_diagnostic.CA1867.severity = warning | |
# Unnecessary call to 'Contains' for sets | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1868 | |
dotnet_diagnostic.CA1868.severity = warning | |
# Cache and reuse 'JsonSerializerOptions' instances | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1869 | |
dotnet_diagnostic.CA1869.severity = warning | |
# Use a cached 'SearchValues' instance | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1870 | |
dotnet_diagnostic.CA1870.severity = warning | |
#################### | |
# SingleFile rules # | |
#################### | |
# These are automatically set based on 'PublishSingleFile' option | |
# Avoid accessing Assembly file path when publishing as a single file | |
# https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/warnings/il3000 | |
# Avoid accessing Assembly file path when publishing as a single file | |
# https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/warnings/il3001 | |
# Avoid calling members annotated with 'RequiresAssemblyFilesAttribute' when publishing as a single file. | |
# https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/warnings/il3002 | |
# 'RequiresAssemblyFilesAttribute' annotations must match across all interface implementations or overrides. | |
# https://learn.microsoft.com/en-us/dotnet/core/deploying/single-file/warnings/il3003 | |
##################### | |
# Reliability rules # | |
##################### | |
# Dispose objects before losing scope | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2000 | |
dotnet_diagnostic.CA2000.severity = warning | |
# Do not lock on objects with weak identity | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2002 | |
dotnet_diagnostic.CA2002.severity = warning | |
# Do not directly await a Task | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2007 | |
dotnet_diagnostic.CA2007.severity = none | |
# Do not create tasks without passing a TaskScheduler | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2008 | |
dotnet_diagnostic.CA2008.severity = warning | |
# Do not call ToImmutableCollection on an ImmutableCollection value | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2009 | |
dotnet_diagnostic.CA2009.severity = warning | |
# Do not assign property within its setter | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2011 | |
dotnet_diagnostic.CA2011.severity = warning | |
# Use ValueTasks correctly | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2012 | |
dotnet_diagnostic.CA2012.severity = warning | |
# Do not use ReferenceEquals with value types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2013 | |
dotnet_diagnostic.CA2013.severity = warning | |
# Do not use stackalloc in loops. | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2014 | |
dotnet_diagnostic.CA2014.severity = warning | |
# Do not define finalizers for types derived from MemoryManager<T> | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2015 | |
dotnet_diagnostic.CA2015.severity = warning | |
# Forward the CancellationToken parameter to methods that take one | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2016 | |
dotnet_diagnostic.CA2016.severity = warning | |
# Parameter count mismatch | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2017 | |
dotnet_diagnostic.CA2017.severity = warning | |
# The count argument to Buffer.BlockCopy should specify the number of bytes to copy | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2018 | |
dotnet_diagnostic.CA2018.severity = warning | |
# ThreadStatic fields should not use inline initialization | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2019 | |
dotnet_diagnostic.CA2019.severity = warning | |
# Prevent behavioral change caused by built-in operators of IntPtr/UIntPtr | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2020 | |
dotnet_diagnostic.CA2020.severity = warning | |
################## | |
# Security rules # | |
################## | |
# Review SQL queries for security vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2100 | |
dotnet_diagnostic.CA2100.severity = warning | |
# Review visible event handlers | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2109 | |
dotnet_diagnostic.CA2109.severity = warning | |
# Seal methods that satisfy private interfaces | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2119 | |
dotnet_diagnostic.CA2119.severity = warning | |
# Avoid Handling Corrupted State Exceptions | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2153 | |
dotnet_diagnostic.CA2153.severity = warning | |
# Do not use insecure deserializer BinaryFormatter | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2300 | |
dotnet_diagnostic.CA2300.severity = warning | |
# Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2301 | |
dotnet_diagnostic.CA2301.severity = warning | |
# Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2302 | |
dotnet_diagnostic.CA2302.severity = warning | |
# Do not use insecure deserializer LosFormatter | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2305 | |
dotnet_diagnostic.CA2305.severity = warning | |
# Do not use insecure deserializer NetDataContractSerializer | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2310 | |
dotnet_diagnostic.CA2310.severity = warning | |
# Do not deserialize without first setting NetDataContractSerializer.Binder | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2311 | |
dotnet_diagnostic.CA2311.severity = warning | |
# Ensure NetDataContractSerializer.Binder is set before deserializing | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2312 | |
dotnet_diagnostic.CA2312.severity = warning | |
# Do not use insecure deserializer ObjectStateFormatter | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2315 | |
dotnet_diagnostic.CA2315.severity = warning | |
# Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2321 | |
dotnet_diagnostic.CA2321.severity = warning | |
# Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2322 | |
dotnet_diagnostic.CA2322.severity = warning | |
# Do not use TypeNameHandling values other than None | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2326 | |
dotnet_diagnostic.CA2326.severity = warning | |
# Do not use insecure JsonSerializerSettings | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2327 | |
dotnet_diagnostic.CA2327.severity = warning | |
# Ensure that JsonSerializerSettings are secure | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2328 | |
dotnet_diagnostic.CA2328.severity = warning | |
# Do not deserialize with JsonSerializer using an insecure configuration | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2329 | |
dotnet_diagnostic.CA2329.severity = warning | |
# Ensure that JsonSerializer has a secure configuration when deserializing | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2330 | |
dotnet_diagnostic.CA2330.severity = warning | |
# Ensure DataTable.ReadXml()'s input is trusted | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2350 | |
dotnet_diagnostic.CA2350.severity = warning | |
# Ensure DataSet.ReadXml()'s input is trusted | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2351 | |
dotnet_diagnostic.CA2351.severity = warning | |
# Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2352 | |
dotnet_diagnostic.CA2352.severity = warning | |
# Unsafe DataSet or DataTable in serializable type | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2353 | |
dotnet_diagnostic.CA2353.severity = warning | |
# Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attack | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2354 | |
dotnet_diagnostic.CA2354.severity = warning | |
# Unsafe DataSet or DataTable in deserialized object graph | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2355 | |
dotnet_diagnostic.CA2355.severity = warning | |
# Unsafe DataSet or DataTable in web deserialized object graph | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2356 | |
dotnet_diagnostic.CA2356.severity = warning | |
# Ensure autogenerated class containing DataSet.ReadXml() is not used with untrusted data | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2361 | |
dotnet_diagnostic.CA2361.severity = warning | |
# Unsafe DataSet or DataTable in autogenerated serializable type can be vulnerable to remote code execution attacks | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2362 | |
dotnet_diagnostic.CA2362.severity = warning | |
# Review code for SQL injection vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3001 | |
dotnet_diagnostic.CA3001.severity = warning | |
# Review code for XSS vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3002 | |
dotnet_diagnostic.CA3002.severity = warning | |
# Review code for file path injection vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3003 | |
dotnet_diagnostic.CA3003.severity = warning | |
# Review code for information disclosure vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3004 | |
dotnet_diagnostic.CA3004.severity = warning | |
# Review code for process command injection vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3006 | |
dotnet_diagnostic.CA3006.severity = warning | |
# Review code for open redirect vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3007 | |
dotnet_diagnostic.CA3007.severity = warning | |
# Review code for XPath injection vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3008 | |
dotnet_diagnostic.CA3008.severity = warning | |
# Review code for XML injection vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3009 | |
dotnet_diagnostic.CA3009.severity = warning | |
# Review code for XAML injection vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3010 | |
dotnet_diagnostic.CA3010.severity = warning | |
# Review code for DLL injection vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3011 | |
dotnet_diagnostic.CA3011.severity = warning | |
# Review code for regex injection vulnerabilities | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3012 | |
dotnet_diagnostic.CA3012.severity = warning | |
# Do not add schema by URL | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3061 | |
dotnet_diagnostic.CA3061.severity = warning | |
# Insecure DTD Processing | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3075 | |
dotnet_diagnostic.CA3075.severity = warning | |
# Insecure XSLT Script Execution | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3076 | |
dotnet_diagnostic.CA3076.severity = warning | |
# Insecure Processing in API Design, XML Document and XML Text Reader | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3077 | |
dotnet_diagnostic.CA3077.severity = warning | |
# Mark verb handlers with ValidateAntiForgeryToken | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca3147 | |
dotnet_diagnostic.CA3147.severity = warning | |
# Do Not Use Weak Cryptographic Algorithms | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5350 | |
dotnet_diagnostic.CA5350.severity = warning | |
# Do Not Use Broken Cryptographic Algorithms | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5351 | |
dotnet_diagnostic.CA5351.severity = warning | |
# Do Not Use Unsafe Cipher Modes | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5358 | |
dotnet_diagnostic.CA5358.severity = warning | |
# Do not disable certificate validation | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5359 | |
dotnet_diagnostic.CA5359.severity = warning | |
# Do not call dangerous methods in deserialization | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5360 | |
dotnet_diagnostic.CA5360.severity = warning | |
# Do not disable SChannel use of strong crypto | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5361 | |
dotnet_diagnostic.CA5361.severity = warning | |
# Potential reference cycle in deserialized object graph | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5362 | |
dotnet_diagnostic.CA5362.severity = warning | |
# Do not disable request validation | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5363 | |
dotnet_diagnostic.CA5363.severity = warning | |
# Do not use deprecated security protocols | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5364 | |
dotnet_diagnostic.CA5364.severity = warning | |
# Do Not Disable HTTP Header Checking | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5365 | |
dotnet_diagnostic.CA5365.severity = warning | |
# Use XmlReader For DataSet Read XML | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5366 | |
dotnet_diagnostic.CA5366.severity = warning | |
# Do Not Serialize Types With Pointer Fields | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5367 | |
dotnet_diagnostic.CA5367.severity = warning | |
# Set ViewStateUserKey For Classes Derived From Page | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5368 | |
dotnet_diagnostic.CA5368.severity = warning | |
# Use XmlReader for Deserialize | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5369 | |
dotnet_diagnostic.CA5369.severity = warning | |
# Use XmlReader for validating reader | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5370 | |
dotnet_diagnostic.CA5370.severity = warning | |
# Use XmlReader for schema read | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5371 | |
dotnet_diagnostic.CA5371.severity = warning | |
# Use XmlReader for XPathDocument | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5372 | |
dotnet_diagnostic.CA5372.severity = warning | |
# Do not use obsolete key derivation function | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5373 | |
dotnet_diagnostic.CA5373.severity = warning | |
# Do Not Use XslTransform | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5374 | |
dotnet_diagnostic.CA5374.severity = warning | |
# Do not use account shared access signature | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5375 | |
dotnet_diagnostic.CA5375.severity = warning | |
# Use SharedAccessProtocol HttpsOnly | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5376 | |
dotnet_diagnostic.CA5376.severity = warning | |
# Use container level access policy | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5377 | |
dotnet_diagnostic.CA5377.severity = warning | |
# Do not disable ServicePointManagerSecurityProtocols | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5378 | |
dotnet_diagnostic.CA5378.severity = warning | |
# Ensure key derivation function algorithm is sufficiently strong | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5379 | |
dotnet_diagnostic.CA5379.severity = warning | |
# Do not add certificates to root store | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5380 | |
dotnet_diagnostic.CA5380.severity = warning | |
# Ensure certificates are not added to root store | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5381 | |
dotnet_diagnostic.CA5381.severity = warning | |
# Use secure cookies in ASP.NET Core | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5382 | |
dotnet_diagnostic.CA5382.severity = warning | |
# Ensure use secure cookies in ASP.NET Core | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5383 | |
dotnet_diagnostic.CA5383.severity = warning | |
# Do not use digital signature algorithm (DSA) | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5384 | |
dotnet_diagnostic.CA5384.severity = warning | |
# Use Rivest–Shamir–Adleman (RSA) algorithm with sufficient key size | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5385 | |
dotnet_diagnostic.CA5385.severity = warning | |
# Avoid hardcoding SecurityProtocolType value | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5386 | |
dotnet_diagnostic.CA5386.severity = warning | |
# Do not use weak key derivation function with insufficient iteration count | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5387 | |
dotnet_diagnostic.CA5387.severity = warning | |
# Ensure sufficient iteration count when using weak key derivation function | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5388 | |
dotnet_diagnostic.CA5388.severity = warning | |
# Do not add archive item's path to the target file system path | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5389 | |
dotnet_diagnostic.CA5389.severity = warning | |
# Do not hard-code encryption key | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5390 | |
dotnet_diagnostic.CA5390.severity = warning | |
# Use antiforgery tokens in ASP.NET Core MVC controllers | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5391 | |
dotnet_diagnostic.CA5391.severity = warning | |
# Use DefaultDllImportSearchPaths attribute for P/Invokes | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5392 | |
dotnet_diagnostic.CA5392.severity = warning | |
# Do not use unsafe DllImportSearchPath value | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5393 | |
dotnet_diagnostic.CA5393.severity = warning | |
# Do not use insecure randomness | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5394 | |
dotnet_diagnostic.CA5394.severity = warning | |
# Miss HttpVerb attribute for action methods | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5395 | |
dotnet_diagnostic.CA5395.severity = warning | |
# Set HttpOnly to true for HttpCookie | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5396 | |
dotnet_diagnostic.CA5396.severity = warning | |
# Do not use deprecated SslProtocols values | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5397 | |
dotnet_diagnostic.CA5397.severity = warning | |
# Avoid hardcoded SslProtocols values | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5398 | |
dotnet_diagnostic.CA5398.severity = warning | |
# Definitely disable HttpClient certificate revocation list check | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5399 | |
dotnet_diagnostic.CA5399.severity = warning | |
# Ensure HttpClient certificate revocation list check is not disabled | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5400 | |
dotnet_diagnostic.CA5400.severity = warning | |
# Do not use CreateEncryptor with non-default IV | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5401 | |
dotnet_diagnostic.CA5401.severity = warning | |
# Use CreateEncryptor with the default IV | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5402 | |
dotnet_diagnostic.CA5402.severity = warning | |
# Do not hard-code certificate | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5403 | |
dotnet_diagnostic.CA5403.severity = warning | |
# Do not disable token validation checks | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5404 | |
dotnet_diagnostic.CA5404.severity = warning | |
# Do not always skip token validation in delegates | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca5405 | |
dotnet_diagnostic.CA5405.severity = warning | |
############### | |
# Usage rules # | |
############### | |
# Review unused parameters | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1801 | |
dotnet_diagnostic.CA1801.severity = warning | |
# Call GC.SuppressFinalize correctly | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca1816 | |
dotnet_diagnostic.CA1816.severity = none # Only needed if you ever use finalizers | |
# Rethrow to preserve stack details | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2200 | |
dotnet_diagnostic.CA2200.severity = warning | |
# Do not raise reserved exception types | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2201 | |
dotnet_diagnostic.CA2201.severity = warning | |
# Initialize value type static fields inline | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2207 | |
dotnet_diagnostic.CA2207.severity = warning | |
# Instantiate argument exceptions correctly | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2208 | |
dotnet_diagnostic.CA2208.severity = warning | |
# Non-constant fields should not be visible | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2211 | |
dotnet_diagnostic.CA2211.severity = warning | |
# Disposable fields should be disposed | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2213 | |
dotnet_diagnostic.CA2213.severity = warning | |
# Do not call overridable methods in constructors | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2214 | |
dotnet_diagnostic.CA2214.severity = warning | |
# Dispose methods should call base class dispose | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2215 | |
dotnet_diagnostic.CA2215.severity = warning | |
# Disposable types should declare finalizer | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2216 | |
dotnet_diagnostic.CA2216.severity = warning | |
# Do not mark enums with FlagsAttribute | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2217 | |
dotnet_diagnostic.CA2217.severity = warning | |
# Override GetHashCode on overriding Equals | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2218 | |
dotnet_diagnostic.CA2218.severity = warning | |
# Do not raise exceptions in exception clauses | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2219 | |
dotnet_diagnostic.CA2219.severity = warning | |
# Override equals on overloading operator equals | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2224 | |
dotnet_diagnostic.CA2224.severity = warning | |
# Operator overloads have named alternates | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2225 | |
dotnet_diagnostic.CA2225.severity = warning | |
# Operators should have symmetrical overloads | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2226 | |
dotnet_diagnostic.CA2226.severity = warning | |
# Collection properties should be read only | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2227 | |
dotnet_diagnostic.CA2227.severity = warning | |
# Implement serialization constructors | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2229 | |
dotnet_diagnostic.CA2229.severity = warning | |
# Overload operator equals on overriding ValueType.Equals | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2231 | |
dotnet_diagnostic.CA2231.severity = warning | |
# Pass System.Uri objects instead of strings | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2234 | |
dotnet_diagnostic.CA2234.severity = warning | |
# Mark all non-serializable fields | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2235 | |
dotnet_diagnostic.CA2235.severity = warning | |
# Mark ISerializable types with SerializableAttribute | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2237 | |
dotnet_diagnostic.CA2237.severity = warning | |
# Provide correct arguments to formatting methods | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2241 | |
dotnet_diagnostic.CA2241.severity = warning | |
# Test for NaN correctly | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2242 | |
dotnet_diagnostic.CA2242.severity = warning | |
# Attribute string literals should parse correctly | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2243 | |
dotnet_diagnostic.CA2243.severity = warning | |
# Do not duplicate indexed element initializations | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2244 | |
dotnet_diagnostic.CA2244.severity = warning | |
# Do not assign a property to itself | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2245 | |
dotnet_diagnostic.CA2245.severity = warning | |
# Do not assign a symbol and its member in the same statement | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2246 | |
dotnet_diagnostic.CA2246.severity = warning | |
# Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2247 | |
dotnet_diagnostic.CA2247.severity = warning | |
# Provide correct 'enum' argument to 'Enum.HasFlag' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2248 | |
dotnet_diagnostic.CA2248.severity = warning | |
# Consider using String.Contains instead of String.IndexOf | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2249 | |
dotnet_diagnostic.CA2249.severity = warning | |
# Use ThrowIfCancellationRequested | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2250 | |
dotnet_diagnostic.CA2250.severity = warning | |
# Use String.Equals over String.Compare | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2251 | |
dotnet_diagnostic.CA2251.severity = warning | |
# Opt in to preview features | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2252 | |
dotnet_diagnostic.CA2252.severity = warning | |
# Named placeholders should not be numeric values | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2253 | |
dotnet_diagnostic.CA2253.severity = warning | |
# Template should be a static expression | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2254 | |
dotnet_diagnostic.CA2254.severity = warning | |
# The ModuleInitializer attribute should not be used in libraries | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2255 | |
dotnet_diagnostic.CA2255.severity = warning | |
# All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2256 | |
dotnet_diagnostic.CA2256.severity = warning | |
# Members defined on an interface with 'DynamicInterfaceCastableImplementationAttribute' should be 'static' | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2257 | |
dotnet_diagnostic.CA2257.severity = warning | |
# Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2258 | |
dotnet_diagnostic.CA2258.severity = warning | |
# Ensure ThreadStatic is only used with static fields | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2259 | |
dotnet_diagnostic.CA2259.severity = warning | |
# Implement generic math interfaces correctly | |
# https://learn.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/ca2260 | |
dotnet_diagnostic.CA2260.severity = warning | |
#################### | |
#################### | |
## StyleCop rules ## | |
#################### | |
#################### | |
################# | |
# Special rules # | |
################# | |
# XmlCommentAnalysisDisabled | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA0001.md | |
dotnet_diagnostic.SA0001.severity = none | |
# InvalidSettingsFile | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA0002.md | |
dotnet_diagnostic.SA0002.severity = warning | |
################# | |
# Spacing rules # | |
################# | |
# KeywordsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1000.md | |
dotnet_diagnostic.SA1000.severity = none # CSharpier conflict | |
# CommasMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1001.md | |
dotnet_diagnostic.SA1001.severity = none # CSharpier replaces | |
# SemicolonsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1002.md | |
dotnet_diagnostic.SA1002.severity = none # CSharpier replaces | |
# SymbolsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1003.md | |
dotnet_diagnostic.SA1003.severity = none # CSharpier replaces | |
# DocumentationLinesMustBeginWithSingleSpace | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1004.md | |
dotnet_diagnostic.SA1004.severity = warning | |
# SingleLineCommentsMustBeginWithSingleSpace | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1005.md | |
dotnet_diagnostic.SA1005.severity = warning | |
# PreprocessorKeywordsMustNotBePrecededBySpace | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1006.md | |
dotnet_diagnostic.SA1006.severity = warning | |
# OperatorKeywordMustBeFollowedBySpace | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1007.md | |
dotnet_diagnostic.SA1007.severity = none # CSharpier replaces | |
# OpeningParenthesisMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1008.md | |
dotnet_diagnostic.SA1008.severity = none # CSharpier replaces | |
# ClosingParenthesisMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1009.md | |
dotnet_diagnostic.SA1009.severity = none # CSharpier conflict | |
# OpeningSquareBracketsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1010.md | |
dotnet_diagnostic.SA1010.severity = none # CSharpier replaces | |
# ClosingSquareBracketsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1011.md | |
dotnet_diagnostic.SA1011.severity = none # CSharpier replaces | |
# OpeningBracesMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1012.md | |
dotnet_diagnostic.SA1012.severity = none # CSharpier replaces | |
# ClosingBracesMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1013.md | |
dotnet_diagnostic.SA1013.severity = none # CSharpier replaces | |
# OpeningGenericBracketsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1014.md | |
dotnet_diagnostic.SA1014.severity = none # CSharpier replaces | |
# ClosingGenericBracketsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1015.md | |
dotnet_diagnostic.SA1015.severity = none # CSharpier replaces | |
# OpeningAttributeBracketsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1016.md | |
dotnet_diagnostic.SA1016.severity = none # CSharpier replaces | |
# ClosingAttributeBracketsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1017.md | |
dotnet_diagnostic.SA1017.severity = none # CSharpier replaces | |
# NullableTypeSymbolsMustNotBePrecededBySpace | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1018.md | |
dotnet_diagnostic.SA1018.severity = none # CSharpier replaces | |
# MemberAccessSymbolsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1019.md | |
dotnet_diagnostic.SA1019.severity = none # CSharpier replaces | |
# IncrementDecrementSymbolsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1020.md | |
dotnet_diagnostic.SA1020.severity = none # CSharpier replaces | |
# NegativeSignsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1021.md | |
dotnet_diagnostic.SA1021.severity = none # CSharpier replaces | |
# PositiveSignsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1022.md | |
dotnet_diagnostic.SA1022.severity = none # CSharpier replaces | |
# DereferenceAndAccessOfMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1023.md | |
dotnet_diagnostic.SA1023.severity = none # CSharpier replaces | |
# ColonsMustBeSpacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1024.md | |
dotnet_diagnostic.SA1024.severity = none # CSharpier replaces | |
# CodeMustNotContainMultipleWhitespaceInARow | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1025.md | |
dotnet_diagnostic.SA1025.severity = none # CSharpier replaces | |
# CodeMustNotContainSpaceAfterNewKeywordInImplicitlyTypedArrayAllocation | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1026.md | |
dotnet_diagnostic.SA1026.severity = none # CSharpier replaces | |
# UseTabsCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1027.md | |
dotnet_diagnostic.SA1027.severity = none # CSharpier replaces | |
# CodeMustNotContainTrailingWhitespace | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1028.md | |
dotnet_diagnostic.SA1028.severity = none # CSharpier replaces | |
##################### | |
# Readability rules # | |
##################### | |
# DoNotPrefixCallsWithBaseUnlessLocalImplementationExists | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1100.md | |
dotnet_diagnostic.SA1100.severity = warning | |
# PrefixLocalCallsWithThis | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1101.md | |
dotnet_diagnostic.SA1101.severity = none # duplicate of IDE0003/IDE0009 | |
# QueryClauses | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1102.md | |
dotnet_diagnostic.SA1102.severity = none # CSharpier replaces | |
# QueryClauses | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1103.md | |
dotnet_diagnostic.SA1103.severity = none # CSharpier replaces | |
# QueryClauses | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1104.md | |
dotnet_diagnostic.SA1104.severity = none # CSharpier replaces | |
# QueryClauses | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1105.md | |
dotnet_diagnostic.SA1105.severity = none # CSharpier replaces | |
# CodeMustNotContainEmptyStatements | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1106.md | |
dotnet_diagnostic.SA1106.severity = warning | |
# CodeMustNotContainMultipleStatementsOnOneLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1107.md | |
dotnet_diagnostic.SA1107.severity = none # CSharpier replaces | |
# BlockStatementsMustNotContainEmbeddedComments | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1108.md | |
dotnet_diagnostic.SA1108.severity = warning | |
# OpeningParenthesisMustBeOnDeclarationLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1110.md | |
dotnet_diagnostic.SA1110.severity = none # CSharpier replaces | |
# ClosingParenthesisMustBeOnLineOfLastParameter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1111.md | |
dotnet_diagnostic.SA1111.severity = none # CSharpier conflict | |
# ClosingParenthesisMustBeOnLineOfOpeningParenthesis | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1112.md | |
dotnet_diagnostic.SA1112.severity = none # CSharpier replaces | |
# CommaMustBeOnSameLineAsPreviousParameter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1113.md | |
dotnet_diagnostic.SA1113.severity = none # CSharpier replaces | |
# ParameterListMustFollowDeclaration | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1114.md | |
dotnet_diagnostic.SA1114.severity = none # CSharpier replaces | |
# ParameterMustFollowComma | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1115.md | |
dotnet_diagnostic.SA1115.severity = none # CSharpier replaces | |
# SplitParametersMustStartOnLineAfterDeclaration | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1116.md | |
dotnet_diagnostic.SA1116.severity = none # CSharpier replaces | |
# ParametersMustBeOnSameLineOrSeparateLines | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1117.md | |
dotnet_diagnostic.SA1117.severity = none # CSharpier replaces | |
# ParameterMustNotSpanMultipleLines | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1118.md | |
dotnet_diagnostic.SA1118.severity = none # CSharpier conflict | |
# CommentsMustContainText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1120.md | |
dotnet_diagnostic.SA1120.severity = warning | |
# UseBuiltInTypeAlias | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1121.md | |
dotnet_diagnostic.SA1121.severity = warning | |
# UseStringEmptyForEmptyStrings | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1122.md | |
dotnet_diagnostic.SA1122.severity = none | |
# DoNotPlaceRegionsWithinElements | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1123.md | |
dotnet_diagnostic.SA1123.severity = warning | |
# DoNotUseRegions | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1124.md | |
dotnet_diagnostic.SA1124.severity = warning | |
# UseShorthandForNullableTypes | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1125.md | |
dotnet_diagnostic.SA1125.severity = warning | |
# GenericTypeConstraintsMustBeOnOwnLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1127.md | |
dotnet_diagnostic.SA1127.severity = none # CSharpier replaces | |
# ConstructorInitializerMustBeOnOwnLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1128.md | |
dotnet_diagnostic.SA1128.severity = none # CSharpier replaces | |
# DoNotUseDefaultValueTypeConstructor | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1129.md | |
dotnet_diagnostic.SA1129.severity = warning | |
# UseLambdaSyntax | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1130.md | |
dotnet_diagnostic.SA1130.severity = warning | |
# UseReadableConditions | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1131.md | |
dotnet_diagnostic.SA1131.severity = warning | |
# DoNotCombineFields | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1132.md | |
dotnet_diagnostic.SA1132.severity = warning | |
# DoNotCombineAttributes | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1133.md | |
dotnet_diagnostic.SA1133.severity = none | |
# AttributesMustNotShareLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1134.md | |
dotnet_diagnostic.SA1134.severity = warning | |
# UsingDirectivesMustBeQualified | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1135.md | |
dotnet_diagnostic.SA1135.severity = warning | |
# EnumValuesShouldBeOnSeparateLines | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1136.md | |
dotnet_diagnostic.SA1136.severity = none # CSharpier replaces | |
# ElementsShouldHaveTheSameIndentation | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1137.md | |
dotnet_diagnostic.SA1137.severity = none # CSharpier conflict | |
# UseLiteralsSuffixNotationInsteadOfCasting | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1139.md | |
dotnet_diagnostic.SA1139.severity = warning | |
# UseTupleSyntax | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1141.md | |
dotnet_diagnostic.SA1141.severity = warning | |
# ReferToTupleElementsByName | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1142.md | |
dotnet_diagnostic.SA1142.severity = warning | |
################## | |
# Ordering rules # | |
################## | |
# UsingDirectivesMustBePlacedCorrectly | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1200.md | |
dotnet_diagnostic.SA1200.severity = none # duplicate of IDE0065 | |
# ElementsMustAppearInTheCorrectOrder | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1201.md | |
dotnet_diagnostic.SA1201.severity = warning | |
# ElementsMustBeOrderedByAccess | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1202.md | |
dotnet_diagnostic.SA1202.severity = warning | |
# ConstantsMustAppearBeforeFields | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1203.md | |
dotnet_diagnostic.SA1203.severity = warning | |
# StaticElementsMustAppearBeforeInstanceElements | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1204.md | |
dotnet_diagnostic.SA1204.severity = warning | |
# PartialElementsMustDeclareAccess | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1205.md | |
dotnet_diagnostic.SA1205.severity = warning | |
# DeclarationKeywordsMustFollowOrder | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1206.md | |
dotnet_diagnostic.SA1206.severity = none # duplicate of IDE0036 | |
# ProtectedMustComeBeforeInternal | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1207.md | |
dotnet_diagnostic.SA1207.severity = warning | |
# SystemUsingDirectivesMustBePlacedBeforeOtherUsingDirectives | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1208.md | |
dotnet_diagnostic.SA1208.severity = warning | |
# UsingAliasDirectivesMustBePlacedAfterOtherUsingDirectives | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1209.md | |
dotnet_diagnostic.SA1209.severity = warning | |
# UsingDirectivesMustBeOrderedAlphabeticallyByNamespace | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1210.md | |
dotnet_diagnostic.SA1210.severity = warning | |
# UsingAliasDirectivesMustBeOrderedAlphabeticallyByAliasName | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1211.md | |
dotnet_diagnostic.SA1211.severity = warning | |
# PropertyAccessorsMustFollowOrder | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1212.md | |
dotnet_diagnostic.SA1212.severity = warning | |
# EventAccessorsMustFollowOrder | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1213.md | |
dotnet_diagnostic.SA1213.severity = warning | |
# ReadonlyElementsMustAppearBeforeNonReadonlyElements | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1214.md | |
dotnet_diagnostic.SA1214.severity = warning | |
# UsingStaticDirectivesMustBePlacedAtTheCorrectLocation | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1216.md | |
dotnet_diagnostic.SA1216.severity = warning | |
# UsingStaticDirectivesMustBeOrderedAlphabetically | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1217.md | |
dotnet_diagnostic.SA1217.severity = warning | |
################ | |
# Naming rules # | |
################ | |
# ElementMustBeginWithUpperCaseLetter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1300.md | |
dotnet_diagnostic.SA1300.severity = none # duplicate of IDE1006 | |
# InterfaceNamesMustBeginWithI | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1302.md | |
dotnet_diagnostic.SA1302.severity = none # duplicate of CA1715 | |
# ConstFieldNamesMustBeginWithUpperCaseLetter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1303.md | |
dotnet_diagnostic.SA1303.severity = none # duplicate of IDE1006 | |
# NonPrivateReadonlyFieldsMustBeginWithUpperCaseLetter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1304.md | |
dotnet_diagnostic.SA1304.severity = none # duplicate of IDE1006 | |
# FieldNamesMustNotUseHungarianNotation | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1305.md | |
dotnet_diagnostic.SA1305.severity = none # Throws false positives too often | |
# FieldNamesMustBeginWithLowerCaseLetter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1306.md | |
dotnet_diagnostic.SA1306.severity = none # duplicate of IDE1006 | |
# AccessibleFieldsMustBeginWithUpperCaseLetter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1307.md | |
dotnet_diagnostic.SA1307.severity = none # duplicate of IDE1006 | |
# VariableNamesMustNotBePrefixed | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1308.md | |
dotnet_diagnostic.SA1308.severity = none # duplicate of IDE1006 | |
# FieldNamesMustNotBeginWithUnderscore | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1309.md | |
dotnet_diagnostic.SA1309.severity = none # conflicts with IDE1006 | |
# FieldNamesMustNotContainUnderscore | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1310.md | |
dotnet_diagnostic.SA1310.severity = none # duplicate of IDE1006 | |
# StaticReadonlyFieldsMustBeginWithUpperCaseLetter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1311.md | |
dotnet_diagnostic.SA1311.severity = none # duplicate of IDE1006 | |
# VariableNamesMustBeginWithLowerCaseLetter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1312.md | |
dotnet_diagnostic.SA1312.severity = none # duplicate of IDE1006 | |
# ParameterNamesMustBeginWithLowerCaseLetter | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1313.md | |
dotnet_diagnostic.SA1313.severity = none # duplicate of IDE1006 | |
# TypeParameterNamesMustBeginWithT | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1314.md | |
dotnet_diagnostic.SA1314.severity = none # duplicate of CA1715 | |
# TupleElementNamesShouldUseCorrectCasing | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1316.md | |
dotnet_diagnostic.SA1316.severity = none # duplicate of IDE1006 | |
######################### | |
# Maintainability rules # | |
######################### | |
# StatementMustNotUseUnnecessaryParenthesis | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1119.md | |
dotnet_diagnostic.SA1119.severity = none # duplicate of IDE0047/IDE0048 | |
# AccessModifierMustBeDeclared | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1400.md | |
dotnet_diagnostic.SA1400.severity = none # duplicate of IDE0040 | |
# FieldsMustBePrivate | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1401.md | |
dotnet_diagnostic.SA1401.severity = none # duplicate of CA1051 | |
# FileMayOnlyContainASingleType | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1402.md | |
dotnet_diagnostic.SA1402.severity = warning | |
# FileMayOnlyContainASingleNamespace | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1403.md | |
dotnet_diagnostic.SA1403.severity = warning | |
# CodeAnalysisSuppressionMustHaveJustification | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1404.md | |
dotnet_diagnostic.SA1404.severity = warning | |
# DebugAssertMustProvideMessageText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1405.md | |
dotnet_diagnostic.SA1405.severity = warning | |
# DebugFailMustProvideMessageText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1406.md | |
dotnet_diagnostic.SA1406.severity = warning | |
# ArithmeticExpressionsMustDeclarePrecedence | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1407.md | |
dotnet_diagnostic.SA1407.severity = none # duplicate of IDE0047/IDE0048 | |
# ConditionalExpressionsMustDeclarePrecedence | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1408.md | |
dotnet_diagnostic.SA1408.severity = none # duplicate of IDE0047/IDE0048 | |
# RemoveDelegateParenthesisWhenPossible | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1410.md | |
dotnet_diagnostic.SA1410.severity = warning | |
# AttributeConstructorMustNotUseUnnecessaryParenthesis | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1411.md | |
dotnet_diagnostic.SA1411.severity = warning | |
# StoreFilesAsUtf8 | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1412.md | |
dotnet_diagnostic.SA1412.severity = warning | |
# UseTrailingCommasInMultiLineInitializers | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1413.md | |
dotnet_diagnostic.SA1413.severity = warning | |
# TupleTypesInSignaturesShouldHaveElementNames | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1414.md | |
dotnet_diagnostic.SA1414.severity = warning | |
################ | |
# Layout rules # | |
################ | |
# BracesForMultiLineStatementsMustNotShareLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1500.md | |
dotnet_diagnostic.SA1500.severity = none # CSharpier conflict | |
# StatementMustNotBeOnSingleLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1501.md | |
dotnet_diagnostic.SA1501.severity = none # CSharpier conflict | |
# ElementMustNotBeOnSingleLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1502.md | |
dotnet_diagnostic.SA1502.severity = none # CSharpier conflict | |
# BracesMustNotBeOmitted | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1503.md | |
dotnet_diagnostic.SA1503.severity = none # duplicate of IDE0011 | |
# AllAccessorsMustBeSingleLineOrMultiLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1504.md | |
dotnet_diagnostic.SA1504.severity = none # CSharpier conflict | |
# OpeningBracesMustNotBeFollowedByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1505.md | |
dotnet_diagnostic.SA1505.severity = none # CSharpier replaces | |
# ElementDocumentationHeadersMustNotBeFollowedByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1506.md | |
dotnet_diagnostic.SA1506.severity = none # CSharpier replaces | |
# CodeMustNotContainMultipleBlankLinesInARow | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1507.md | |
dotnet_diagnostic.SA1507.severity = none # CSharpier replaces | |
# ClosingBracesMustNotBePrecededByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1508.md | |
dotnet_diagnostic.SA1508.severity = none # CSharpier replaces | |
# OpeningBracesMustNotBePrecededByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1509.md | |
dotnet_diagnostic.SA1509.severity = none # CSharpier replaces | |
# ChainedStatementBlocksMustNotBePrecededByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1510.md | |
dotnet_diagnostic.SA1510.severity = none # CSharpier replaces | |
# WhileDoFooterMustNotBePrecededByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1511.md | |
dotnet_diagnostic.SA1511.severity = none # CSharpier replaces | |
# SingleLineCommentsMustNotBeFollowedByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1512.md | |
dotnet_diagnostic.SA1512.severity = warning | |
# ClosingBraceMustBeFollowedByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1513.md | |
dotnet_diagnostic.SA1513.severity = warning | |
# ElementDocumentationHeaderMustBePrecededByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1514.md | |
dotnet_diagnostic.SA1514.severity = warning | |
# SingleLineCommentMustBePrecededByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1515.md | |
dotnet_diagnostic.SA1515.severity = warning | |
# ElementsMustBeSeparatedByBlankLine | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1516.md | |
dotnet_diagnostic.SA1516.severity = none # CSharpier conflict | |
# CodeMustNotContainBlankLinesAtStartOfFile | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1517.md | |
dotnet_diagnostic.SA1517.severity = none # CSharpier replaces | |
# UseLineEndingsCorrectlyAtEndOfFile | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1518.md | |
dotnet_diagnostic.SA1518.severity = none # CSharpier replaces | |
# BracesMustNotBeOmittedFromMultiLineChildStatement | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1519.md | |
dotnet_diagnostic.SA1519.severity = none # duplicate of IDE0011 | |
# UseBracesConsistently | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1520.md | |
dotnet_diagnostic.SA1520.severity = none # duplicate of IDE0011 | |
####################### | |
# Documentation rules # | |
####################### | |
# ElementsMustBeDocumented | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1600.md | |
dotnet_diagnostic.SA1600.severity = none | |
# PartialElementsMustBeDocumented | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1601.md | |
dotnet_diagnostic.SA1601.severity = none | |
# EnumerationItemsMustBeDocumented | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1602.md | |
dotnet_diagnostic.SA1602.severity = none | |
# ElementDocumentationMustHaveSummary | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1604.md | |
dotnet_diagnostic.SA1604.severity = warning | |
# PartialElementDocumentationMustHaveSummary | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1605.md | |
dotnet_diagnostic.SA1605.severity = warning | |
# ElementDocumentationMustHaveSummaryText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1606.md | |
dotnet_diagnostic.SA1606.severity = warning | |
# PartialElementDocumentationMustHaveSummaryText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1607.md | |
dotnet_diagnostic.SA1607.severity = warning | |
# ElementDocumentationMustNotHaveDefaultSummary | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1608.md | |
dotnet_diagnostic.SA1608.severity = warning | |
# PropertyDocumentationMustHaveValue | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1609.md | |
dotnet_diagnostic.SA1609.severity = warning | |
# PropertyDocumentationMustHaveValueText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1610.md | |
dotnet_diagnostic.SA1610.severity = warning | |
# ElementParametersMustBeDocumented | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1611.md | |
dotnet_diagnostic.SA1611.severity = none | |
# ElementParameterDocumentationMustMatchElementParameters | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1612.md | |
dotnet_diagnostic.SA1612.severity = warning | |
# ElementParameterDocumentationMustDeclareParameterName | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1613.md | |
dotnet_diagnostic.SA1613.severity = warning | |
# ElementParameterDocumentationMustHaveText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1614.md | |
dotnet_diagnostic.SA1614.severity = warning | |
# ElementReturnValueMustBeDocumented | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1615.md | |
dotnet_diagnostic.SA1615.severity = none | |
# ElementReturnValueDocumentationMustHaveText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1616.md | |
dotnet_diagnostic.SA1616.severity = warning | |
# VoidReturnValueMustNotBeDocumented | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1617.md | |
dotnet_diagnostic.SA1617.severity = warning | |
# GenericTypeParametersMustBeDocumented | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1618.md | |
dotnet_diagnostic.SA1618.severity = none | |
# GenericTypeParametersMustBeDocumentedPartialClass | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1619.md | |
dotnet_diagnostic.SA1619.severity = none | |
# GenericTypeParameterDocumentationMustMatchTypeParameters | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1620.md | |
dotnet_diagnostic.SA1620.severity = warning | |
# GenericTypeParameterDocumentationMustDeclareParameterName | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1621.md | |
dotnet_diagnostic.SA1621.severity = warning | |
# GenericTypeParameterDocumentationMustHaveText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1622.md | |
dotnet_diagnostic.SA1622.severity = warning | |
# PropertySummaryDocumentationMustMatchAccessors | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1623.md | |
dotnet_diagnostic.SA1623.severity = warning | |
# PropertySummaryDocumentationMustOmitSetAccessorWithRestrictedAccess | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1624.md | |
dotnet_diagnostic.SA1624.severity = warning | |
# ElementDocumentationMustNotBeCopiedAndPasted | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1625.md | |
dotnet_diagnostic.SA1625.severity = warning | |
# SingleLineCommentsMustNotUseDocumentationStyleSlashes | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1626.md | |
dotnet_diagnostic.SA1626.severity = warning | |
# DocumentationTextMustNotBeEmpty | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1627.md | |
dotnet_diagnostic.SA1627.severity = warning | |
# DocumentationTextMustEndWithAPeriod | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1629.md | |
dotnet_diagnostic.SA1629.severity = warning | |
# FileMustHaveHeader | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1633.md | |
dotnet_diagnostic.SA1633.severity = none | |
# FileHeaderMustShowCopyright | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1634.md | |
dotnet_diagnostic.SA1634.severity = none | |
# FileHeaderMustHaveCopyrightText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1635.md | |
dotnet_diagnostic.SA1635.severity = none | |
# FileHeaderCopyrightTextMustMatch | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1636.md | |
dotnet_diagnostic.SA1636.severity = none | |
# FileHeaderMustContainFileName | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1637.md | |
dotnet_diagnostic.SA1637.severity = none | |
# FileHeaderFileNameDocumentationMustMatchFileName | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1638.md | |
dotnet_diagnostic.SA1638.severity = warning | |
# FileHeaderMustHaveSummary | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1639.md | |
dotnet_diagnostic.SA1639.severity = none | |
# FileHeaderMustHaveValidCompanyText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1640.md | |
dotnet_diagnostic.SA1640.severity = none | |
# FileHeaderCompanyNameTextMustMatch | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1641.md | |
dotnet_diagnostic.SA1641.severity = warning | |
# ConstructorSummaryDocumentationMustBeginWithStandardText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1642.md | |
dotnet_diagnostic.SA1642.severity = none | |
# DestructorSummaryDocumentationMustBeginWithStandardText | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1643.md | |
dotnet_diagnostic.SA1643.severity = none | |
# InheritDocMustBeUsedWithInheritingClass | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1648.md | |
dotnet_diagnostic.SA1648.severity = none | |
# FileNameMustMatchTypeName | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1649.md | |
dotnet_diagnostic.SA1649.severity = warning | |
# DoNotUsePlaceholderElements | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SA1651.md | |
dotnet_diagnostic.SA1651.severity = warning | |
##################### | |
# Alternative rules # | |
##################### | |
# DoNotPrefixLocalMembersWithThis | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SX1101.md | |
dotnet_diagnostic.SX1101.severity = none # duplicate of IDE0003/IDE0009 | |
# FieldNamesMustBeginWithUnderscore | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SX1309.md | |
dotnet_diagnostic.SX1309.severity = none # conflicts with IDE1006 | |
# StaticFieldNamesMustBeginWithUnderscore | |
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/SX1309S.md | |
dotnet_diagnostic.SX1309S.severity = none # conflicts with IDE1006 | |
######################## | |
######################## | |
## ReSharper settings ## | |
######################## | |
######################## | |
# https://www.jetbrains.com/help/resharper/EditorConfig_CSHARP_CSharpCodeStylePageImplSchema.html#resharper_csharp_trailing_comma_in_multiline_lists | |
resharper_csharp_trailing_comma_in_multiline_lists = true | |
# https://www.jetbrains.com/help/resharper/JoinNullCheckWithUsage.html | |
resharper_join_null_check_with_usage_highlighting = none | |
# https://www.jetbrains.com/help/resharper/Reference__Code_Inspections_CSHARP.html#CodeSmell | |
resharper_async_void_method_highlighting = warning | |
# https://www.jetbrains.com/help/resharper/CollectionNeverUpdated.Global.html | |
resharper_collection_never_updated_global_highlighting = none |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment