coding-conventions/.NET/.editorconfig
Sören Schmincke 8d497b8e0c
Initial ruleset (#1)
The initial ruleset is copied from the original repository in Azure DevOps. No configuration or rules have been altered only the text in the `readme` files is translated into english.

Reviewed-on: #1
Co-authored-by: Sören Schmincke <sschmincke@online.de>
Co-committed-by: Sören Schmincke <sschmincke@online.de>
2026-03-22 13:01:23 +01:00

3248 lines
112 KiB
INI
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2022
root = true
############################################################################################################################################
# Visual Studio - editorconfig #
# https://docs.microsoft.com/en-us/visualstudio/ide/create-portable-custom-editor-options?view=vs-2022#supported-settings #
############################################################################################################################################
[*]
charset = utf-8
end_of_line = crlf
indent_size = 4
indent_style = space
tab_width = 4
insert_final_newline = true
trim_trailing_whitespace = true
# Not supported
max_line_length = 140
############################################################################################################################################
# Editor Guidelines #
# https://marketplace.visualstudio.com/items?itemName=PaulHarrington.EditorGuidelines #
############################################################################################################################################
[*]
guidelines = 140
guidelines_style = 1px dotted red
############################################################################################################################################
# .NET Source Code Analysis #
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/overview?view=vs-2022 #
############################################################################################################################################
[*.{cs,vb}]
############################################################################################################################################
# .NET Code style rules #
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/style-rules/?view=vs-2022 #
############################################################################################################################################
# Language and unnecessary code rules ######################################################################################################
# Simplify name
dotnet_diagnostic.IDE0001.severity = warning
# Simplify member access
dotnet_diagnostic.IDE0002.severity = warning
# Remove this or Me qualification
dotnet_diagnostic.IDE0003.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
# Remove unnecessary cast
dotnet_diagnostic.IDE0004.severity = warning
# Remove unnecessary import
# - https://github.com/dotnet/roslyn/issues/41640
dotnet_diagnostic.IDE0005.severity = suggestion
# Use 'var' instead of explicit type
dotnet_diagnostic.IDE0007.severity = warning
csharp_style_var_for_built_in_types = false
csharp_style_var_when_type_is_apparent = false
csharp_style_var_elsewhere = false
# Use explicit type instead of 'var'
dotnet_diagnostic.IDE0008.severity = warning
# Add this or Me qualification
dotnet_diagnostic.IDE0009.severity = warning
# Add missing cases to switch statement
dotnet_diagnostic.IDE0010.severity = warning
# Add braces
dotnet_diagnostic.IDE0011.severity = warning
csharp_prefer_braces = true
# Use throw expression
dotnet_diagnostic.IDE0016.severity = warning
csharp_style_throw_expression = true
# Use object initializers
dotnet_diagnostic.IDE0017.severity = warning
dotnet_style_object_initializer = true
# Inline variable declaration
dotnet_diagnostic.IDE0018.severity = warning
csharp_style_inlined_variable_declaration = true
# Use pattern matching to avoid 'as' followed by a 'null' check
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
dotnet_diagnostic.IDE0020.severity = warning
csharp_style_pattern_matching_over_is_with_cast_check = true
# Use expression body for constructors
dotnet_diagnostic.IDE0021.severity = warning
csharp_style_expression_bodied_constructors = false
# Use expression body for methods
dotnet_diagnostic.IDE0022.severity = warning
csharp_style_expression_bodied_methods = false
# Use expression body for operators
dotnet_diagnostic.IDE0023.severity = warning
csharp_style_expression_bodied_operators = true
# Use expression body for operators
dotnet_diagnostic.IDE0024.severity = warning
# Use expression body for properties
dotnet_diagnostic.IDE0025.severity = warning
csharp_style_expression_bodied_properties = true
# Use expression body for indexers
dotnet_diagnostic.IDE0026.severity = warning
csharp_style_expression_bodied_indexers = true
# Use expression body for accessors
dotnet_diagnostic.IDE0027.severity = warning
csharp_style_expression_bodied_accessors = true
# Use collection initializers
dotnet_diagnostic.IDE0028.severity = warning
dotnet_style_collection_initializer = true
# Use coalesce expression (non-nullable types)
dotnet_diagnostic.IDE0029.severity = warning
dotnet_style_coalesce_expression = true
# Use coalesce expression (nullable types)
dotnet_diagnostic.IDE0030.severity = warning
# Use null propagation
dotnet_diagnostic.IDE0031.severity = warning
dotnet_style_null_propagation = true
# Use auto property
dotnet_diagnostic.IDE0032.severity = warning
dotnet_style_prefer_auto_properties = true
# Use explicitly provided tuple name
dotnet_diagnostic.IDE0033.severity = error
dotnet_style_explicit_tuple_names = true
# Simplify 'default' expression
dotnet_diagnostic.IDE0034.severity = warning
csharp_prefer_simple_default_expression = true
# Remove unreachable code
dotnet_diagnostic.IDE0035.severity = warning
# Order modifiers
dotnet_diagnostic.IDE0036.severity = warning
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
visual_basic_preferred_modifier_order = Partial,Default,Private,Protected,Public,Friend,NotOverridable,Overridable,MustOverride,Overloads,Overrides,MustInherit,NotInheritable,Static,Shared,Shadows,ReadOnly,WriteOnly,Dim,Const,WithEvents,Widening,Narrowing,Custom,Async
# Use inferred member name
dotnet_diagnostic.IDE0037.severity = warning
dotnet_style_prefer_inferred_tuple_names = true
dotnet_style_prefer_inferred_anonymous_type_member_names = true
# Use pattern matching to avoid 'is' check followed by a cast
dotnet_diagnostic.IDE0038.severity = warning
# Use local function instead of lambda
dotnet_diagnostic.IDE0039.severity = warning
csharp_style_prefer_local_over_anonymous_function = true
# Add accessibility modifiers
dotnet_diagnostic.IDE0040.severity = warning
dotnet_style_require_accessibility_modifiers = for_non_interface_members
# Use is null check
dotnet_diagnostic.IDE0041.severity = warning
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
# Deconstruct variable declaration
dotnet_diagnostic.IDE0042.severity = warning
csharp_style_deconstructed_variable_declaration = true
# Add readonly modifier
dotnet_diagnostic.IDE0044.severity = none
dotnet_style_readonly_field = false
# Use conditional expression for assignment
dotnet_diagnostic.IDE0045.severity = silent
dotnet_style_prefer_conditional_expression_over_assignment = true
# Use conditional expression for return
dotnet_diagnostic.IDE0046.severity = silent
dotnet_style_prefer_conditional_expression_over_return = true
# Remove unnecessary parentheses
dotnet_diagnostic.IDE0047.severity = warning
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
dotnet_style_parentheses_in_other_operators = never_if_unnecessary
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
# Add parentheses for clarity
dotnet_diagnostic.IDE0048.severity = warning
# Use language keywords instead of framework type names for type references
dotnet_diagnostic.IDE0049.severity = error
dotnet_style_predefined_type_for_locals_parameters_members = true
dotnet_style_predefined_type_for_member_access = true
# Convert anonymous type to tuple
dotnet_diagnostic.IDE0050.severity = silent
# Remove unused private member
dotnet_diagnostic.IDE0051.severity = warning
# Remove unread private member
dotnet_diagnostic.IDE0052.severity = warning
# Use expression body for lambdas
dotnet_diagnostic.IDE0053.severity = warning
csharp_style_expression_bodied_lambdas = true
# Use compound assignment
dotnet_diagnostic.IDE0054.severity = warning
dotnet_style_prefer_compound_assignment = true
# Use index operator
dotnet_diagnostic.IDE0056.severity = warning
csharp_style_prefer_index_operator = true
# Use range operator
dotnet_diagnostic.IDE0057.severity = warning
csharp_style_prefer_range_operator = true
# Remove unused expression value
dotnet_diagnostic.IDE0058.severity = silent
csharp_style_unused_value_expression_statement_preference = discard_variable
visual_basic_style_unused_value_expression_statement_preference = unused_local_variable
# Remove unnecessary value assignment
dotnet_diagnostic.IDE0059.severity = warning
csharp_style_unused_value_assignment_preference = discard_variable
visual_basic_style_unused_value_assignment_preference = unused_local_variable
# Remove unused parameter
dotnet_diagnostic.IDE0060.severity = warning
dotnet_code_quality_unused_parameters = all
# Use expression body for local functions
dotnet_diagnostic.IDE0061.severity = warning
csharp_style_expression_bodied_local_functions = true
# Make local function static
dotnet_diagnostic.IDE0062.severity = error
csharp_prefer_static_local_function = true
# Use simple 'using' statement
dotnet_diagnostic.IDE0063.severity = warning
csharp_prefer_simple_using_statement = true
# Make struct fields writable
dotnet_diagnostic.IDE0064.severity = warning
# 'using' directive placement
dotnet_diagnostic.IDE0065.severity = warning
csharp_using_directive_placement = outside_namespace
# Use switch expression
dotnet_diagnostic.IDE0066.severity = warning
csharp_style_prefer_switch_expression = true
# Use 'System.HashCode.Combine'
dotnet_diagnostic.IDE0070.severity = error
# Simplify interpolation
dotnet_diagnostic.IDE0071.severity = warning
dotnet_style_prefer_simplified_interpolation = true
# Add missing cases to switch expression
dotnet_diagnostic.IDE0072.severity = warning
# Require file header
dotnet_diagnostic.IDE0073.severity = none
# Use coalesce compound assignment
dotnet_diagnostic.IDE0074.severity = warning
# Simplify conditional expression
dotnet_diagnostic.IDE0075.severity = warning
dotnet_style_prefer_simplified_boolean_expressions = true
# Use pattern matching
dotnet_diagnostic.IDE0078.severity = warning
csharp_style_prefer_pattern_matching = true
# Remove unnecessary suppression
dotnet_diagnostic.IDE0079.severity = warning
dotnet_remove_unnecessary_suppression_exclusions = none
# Remove unnecessary suppression operator
dotnet_diagnostic.IDE0080.severity = warning
# Remove ByVal
dotnet_diagnostic.IDE0081.severity = warning
# Convert typeof to nameof
dotnet_diagnostic.IDE0082.severity = warning
# Use pattern matching (not operator)
dotnet_diagnostic.IDE0083.severity = warning
csharp_style_prefer_not_pattern = true
# Use pattern matching (IsNot operator)
dotnet_diagnostic.IDE0084.severity = warning
visual_basic_style_prefer_isnot_expression = true
# Simplify new expression
dotnet_diagnostic.IDE0090.severity = warning
csharp_style_implicit_object_creation_when_type_is_apparent = true
# Remove unnecessary equality operator
dotnet_diagnostic.IDE0100.severity = warning
# Remove unnecessary discard
dotnet_diagnostic.IDE0110.severity = warning
# Simplify LINQ expression
dotnet_diagnostic.IDE0120.severity = warning
# Namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = warning
dotnet_style_namespace_match_folder = true
# Simplify object creation
dotnet_diagnostic.IDE0140.severity = warning
visual_basic_style_prefer_simplified_object_creation = true
# Prefer 'null' check over type check
dotnet_diagnostic.IDE0150.severity = warning
csharp_style_prefer_null_check_over_type_check = true
# Convert to block scoped namespace
dotnet_diagnostic.IDE0160.severity = warning
csharp_style_namespace_declarations = file_scoped
# Convert to file-scoped namespace
dotnet_diagnostic.IDE0161.severity = warning
# Simplify property pattern
dotnet_diagnostic.IDE0170.severity = warning
csharp_style_prefer_extended_property_pattern = true
# Use tuple to swap values
dotnet_diagnostic.IDE0180.severity = warning
csharp_style_prefer_tuple_swap = true
# Remove unnecessary lambda expression
dotnet_diagnostic.IDE0200.severity = warning
csharp_style_prefer_method_group_conversion = true
# Convert to top-level statements
dotnet_diagnostic.IDE0210.severity = warning
csharp_style_prefer_top_level_statements = true
# Convert to 'Program.Main' style program
dotnet_diagnostic.IDE0211.severity = warning
# Add explicit cast in foreach loop
dotnet_diagnostic.IDE0220.severity = warning
dotnet_style_prefer_foreach_explicit_cast_in_source = when_strongly_typed
# Use UTF-8 string literal
dotnet_diagnostic.IDE0230.severity = warning
csharp_style_prefer_utf8_string_literals = true
# Nullable directive is redundant
dotnet_diagnostic.IDE0240.severity = warning
# Nullable directive is unnecessary
dotnet_diagnostic.IDE0241.severity = warning
# Struct can be made 'readonly'
dotnet_diagnostic.IDE0250.severity = warning
csharp_style_prefer_readonly_struct = true
# Member can be made 'readonly'
dotnet_diagnostic.IDE0251.severity = warning
csharp_style_prefer_readonly_struct_member = true
# Use pattern matching
dotnet_diagnostic.IDE0260.severity = warning
# Null check can be simplified
dotnet_diagnostic.IDE0270.severity = warning
# Use 'nameof'
dotnet_diagnostic.IDE0280.severity = warning
# Use primary constructor
dotnet_diagnostic.IDE0290.severity = suggestion
csharp_style_prefer_primary_constructors = true
# Use collection expression for array
dotnet_diagnostic.IDE0300.severity = warning
# Use collection expression for empty
dotnet_diagnostic.IDE0301.severity = warning
# Use collection expression for stackalloc
dotnet_diagnostic.IDE0302.severity = warning
# Use collection expression for Create()
dotnet_diagnostic.IDE0303.severity = warning
# Use collection expression for builder
dotnet_diagnostic.IDE0304.severity = warning
# Use collection expression for fluent
dotnet_diagnostic.IDE0305.severity = warning
# Use conditional delegate call
dotnet_diagnostic.IDE1005.severity = warning
csharp_style_conditional_delegate_call = true
# Miscellaneous rules #####################################################################################################################
# Remove invalid global 'SuppressMessageAttribute'
dotnet_diagnostic.IDE0076.severity = warning
# Avoid legacy format target in global 'SuppressMessageAttribute'
dotnet_diagnostic.IDE0077.severity = warning
# Formatting ############################################################################################################################
# Organize usings
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
# 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 = flush_left
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_between_parentheses = false
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 = false
csharp_preserve_single_line_blocks = true
# Fix formatting
dotnet_diagnostic.IDE0055.severity = warning
# Naming rules ############################################################################################################################
# Rules --------------------------------------------------------------
# Locals must be camel case
dotnet_naming_rule.camel_case_locals.symbols = local_symbols
dotnet_naming_rule.camel_case_locals.style = camel_case_style
dotnet_naming_rule.camel_case_locals.severity = warning
# Type parameters must be pascal case with 'T' prefix
dotnet_naming_rule.pascal_case_type_parameters.symbols = type_parameter_symbols
dotnet_naming_rule.pascal_case_type_parameters.style = pascal_case_t_prefix_style
dotnet_naming_rule.pascal_case_type_parameters.severity = warning
# Parameters must be camel case
dotnet_naming_rule.camel_case_parameters.symbols = parameter_symbols
dotnet_naming_rule.camel_case_parameters.style = camel_case_style
dotnet_naming_rule.camel_case_parameters.severity = warning
# Private fields must be camel case with prefix
dotnet_naming_rule.camel_case_with_prefix_private_fields.symbols = private_field_symbols
dotnet_naming_rule.camel_case_with_prefix_private_fields.style = camel_case_style_with_prefix
dotnet_naming_rule.camel_case_with_prefix_private_fields.severity = warning
# Async methods must be pascal case with 'Async' suffix
dotnet_naming_rule.pascal_case_async_suffix_private_methods.symbols = async_method_symbols
dotnet_naming_rule.pascal_case_async_suffix_private_methods.style = pascal_case_async_suffix_style
dotnet_naming_rule.pascal_case_async_suffix_private_methods.severity = warning
# Class members must be pascal case
dotnet_naming_rule.pascal_case_class_members.symbols = class_member_symbols
dotnet_naming_rule.pascal_case_class_members.style = pascal_case_style
dotnet_naming_rule.pascal_case_class_members.severity = warning
# Interfaces must be pascal case with 'I' prefix
dotnet_naming_rule.pascal_case_i_prefix_interfaces.symbols = interface_symbols
dotnet_naming_rule.pascal_case_i_prefix_interfaces.style = pascal_case_i_prefix_style
dotnet_naming_rule.pascal_case_i_prefix_interfaces.severity = warning
# Enums, Structs, Classes, Namespaces must be pascal case
dotnet_naming_rule.pascal_case_main_symbols.symbols = main_symbols
dotnet_naming_rule.pascal_case_main_symbols.style = pascal_case_style
dotnet_naming_rule.pascal_case_main_symbols.severity = warning
# Symbols ------------------------------------------------------------
# Local symbols
dotnet_naming_symbols.local_symbols.applicable_kinds = local_function,local
dotnet_naming_symbols.local_symbols.applicable_accessibilities = local
# Parameter symbols
dotnet_naming_symbols.parameter_symbols.applicable_kinds = parameter
# Type parameter symbols
dotnet_naming_symbols.type_parameter_symbols.applicable_kinds = type_parameter
# Private field symbols
dotnet_naming_symbols.private_field_symbols.applicable_kinds = field
dotnet_naming_symbols.private_field_symbols.applicable_accessibilities = private
# Async method symbols
dotnet_naming_symbols.async_method_symbols.applicable_kinds = method
dotnet_naming_symbols.async_method_symbols.required_modifiers = async
# Member symbols
dotnet_naming_symbols.class_member_symbols.applicable_kinds = delegate,event,field,method,property
# Interface symbols
dotnet_naming_symbols.interface_symbols.applicable_kinds = interface
dotnet_naming_symbols.interface_symbols.applicable_accessibilities = *
# Main symbols
dotnet_naming_symbols.main_symbols.applicable_kinds = namespace,class,struct,enum
dotnet_naming_symbols.main_symbols.applicable_accessibilities = *
# Styles -------------------------------------------------------------
# Camel case style
dotnet_naming_style.camel_case_style.capitalization = camel_case
# Camel case style with prefix
dotnet_naming_style.camel_case_style_with_prefix.capitalization = camel_case
dotnet_naming_style.camel_case_style_with_prefix.required_prefix = _
# Pascal case style
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
# Pascal case with 'Async' suffix
dotnet_naming_style.pascal_case_async_suffix_style.required_suffix = Async
dotnet_naming_style.pascal_case_async_suffix_style.capitalization = pascal_case
# Pascal case with 'I' prefix
dotnet_naming_style.pascal_case_i_prefix_style.required_prefix = I
dotnet_naming_style.pascal_case_i_prefix_style.capitalization = pascal_case
# Pascal case with 'T' prefix
dotnet_naming_style.pascal_case_t_prefix_style.required_prefix = T
dotnet_naming_style.pascal_case_t_prefix_style.capitalization = pascal_case
# Naming styles
dotnet_diagnostic.IDE1006.severity = warning
###########################################################################################################################################
# .NET Code quality rules #
# https://docs.microsoft.com/en-us/dotnet/fundamentals/code-analysis/quality-rules/?view=vs-2022 #
###########################################################################################################################################
# Design ##################################################################################################################################
# Do not declare static members on generic types
dotnet_diagnostic.CA1000.severity = error
# Types that own disposable fields should be disposable
dotnet_diagnostic.CA1001.severity = error
# Do not expose generic lists
dotnet_diagnostic.CA1002.severity = error
# Use generic event handler instances
dotnet_diagnostic.CA1003.severity = error
# Avoid excessive parameters on generic types
dotnet_diagnostic.CA1005.severity = error
# Enums should have zero value
dotnet_diagnostic.CA1008.severity = error
# Collections should implement generic interface
dotnet_diagnostic.CA1010.severity = error
# Abstract types should not have constructors
dotnet_diagnostic.CA1012.severity = error
# Mark assemblies with CLSCompliant
dotnet_diagnostic.CA1014.severity = error
# Mark assemblies with assembly version
dotnet_diagnostic.CA1016.severity = error
# Mark assemblies with ComVisible
dotnet_diagnostic.CA1017.severity = error
# Mark attributes with AttributeUsageAttribute
dotnet_diagnostic.CA1018.severity = error
# Define accessors for attribute arguments
dotnet_diagnostic.CA1019.severity = error
# Avoid out parameters
dotnet_diagnostic.CA1021.severity = error
# Use properties where appropriate
dotnet_diagnostic.CA1024.severity = error
# Mark enums with FlagsAttribute
dotnet_diagnostic.CA1027.severity = error
# Enum Storage should be Int32
dotnet_diagnostic.CA1028.severity = error
# Use events where appropriate
dotnet_diagnostic.CA1030.severity = error
# Do not catch general exception types
dotnet_diagnostic.CA1031.severity = error
# Implement standard exception constructors
dotnet_diagnostic.CA1032.severity = error
# Interface methods should be callable by child types
dotnet_diagnostic.CA1033.severity = error
# Nested types should not be visible
dotnet_diagnostic.CA1034.severity = error
# Override methods on comparable types
dotnet_diagnostic.CA1036.severity = error
# Avoid empty interfaces
dotnet_diagnostic.CA1040.severity = error
# Provide ObsoleteAttribute message
dotnet_diagnostic.CA1041.severity = error
# Use integral or string argument for indexers
dotnet_diagnostic.CA1043.severity = error
# Properties should not be write only
dotnet_diagnostic.CA1044.severity = error
# Do not pass types by reference
dotnet_diagnostic.CA1045.severity = error
# Do not overload equality operator on reference types
dotnet_diagnostic.CA1046.severity = error
# Do not declare protected member in sealed type
dotnet_diagnostic.CA1047.severity = error
# Declare types in namespaces
dotnet_diagnostic.CA1050.severity = error
# Do not declare visible instance fields
dotnet_diagnostic.CA1051.severity = error
# Static holder types should be sealed
dotnet_diagnostic.CA1052.severity = error
# Static holder types should not have constructors
dotnet_diagnostic.CA1053.severity = error
# URI parameters should not be strings
dotnet_diagnostic.CA1054.severity = error
# URI return values should not be strings
dotnet_diagnostic.CA1055.severity = error
# URI properties should not be strings
dotnet_diagnostic.CA1056.severity = error
# Types should not extend certain base types
dotnet_diagnostic.CA1058.severity = error
# Move P/Invokes to NativeMethods class
dotnet_diagnostic.CA1060.severity = error
# Do not hide base class methods
dotnet_diagnostic.CA1061.severity = error
# Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = error
# Implement IDisposable correctly
dotnet_diagnostic.CA1063.severity = error
# Exceptions should be public
dotnet_diagnostic.CA1064.severity = error
# Do not raise exceptions in unexpected locations
dotnet_diagnostic.CA1065.severity = error
# Implement IEquatable when overriding Equals
dotnet_diagnostic.CA1066.severity = error
# Override Object.Equals(object) when implementing IEquatable<T>
dotnet_diagnostic.CA1067.severity = error
# CancellationToken parameters must come last
dotnet_diagnostic.CA1068.severity = error
# Enumss should not have duplicate values
dotnet_diagnostic.CA1069.severity = error
# Do not declare event fields as virtual
dotnet_diagnostic.CA1070.severity = error
# Documentation ###########################################################################################################################
# Avoid using cref tags with a prefix
dotnet_diagnostic.CA1200.severity = warning
# Globalization ###########################################################################################################################
# Do not pass literals as localized parameters
dotnet_diagnostic.CA1303.severity = warning
# Specify CultureInfo
dotnet_diagnostic.CA1304.severity = warning
# Specify IFormatProvider
dotnet_diagnostic.CA1305.severity = warning
# Specify StringComparison
dotnet_diagnostic.CA1307.severity = warning
# Normalize strings to uppercase
dotnet_diagnostic.CA1308.severity = warning
# Use ordinal StringComparison
dotnet_diagnostic.CA1309.severity = warning
# Specify StringComparison for correctness
dotnet_diagnostic.CA1310.severity = warning
# Specify a culture or use an invariant version
dotnet_diagnostic.CA1311.severity = warning
# Specify marshaling for P/Invoke string arguments
dotnet_diagnostic.CA2101.severity = warning
# Portability and interoperability ########################################################################################################
# P/Invokes should not be visible
dotnet_diagnostic.CA1401.severity = error
# Validate platform compatibility
dotnet_diagnostic.CA1416.severity = error
# Do not use 'OutAttribute' on string parameters for P/Invokes
dotnet_diagnostic.CA1417.severity = error
# Use valid platform string
dotnet_diagnostic.CA1418.severity = error
# Provide a parameterless constructor that is as visible as the containing type for concrete types derived from 'System.Runtime.InteropServices.SafeHandle'
dotnet_diagnostic.CA1419.severity = error
# Property, type, or attribute requires runtime marshalling
dotnet_diagnostic.CA1420.severity = error
# Method uses runtime marshalling when DisableRuntimeMarshallingAttribute is applied
dotnet_diagnostic.CA1421.severity = error
# Validate platform compatibility - obsoleted APIs
dotnet_diagnostic.CA1422.severity = error
# Maintainability #########################################################################################################################
# Avoid excessive inheritance
dotnet_diagnostic.CA1501.severity = warning
# Avoid excessive complexity
dotnet_diagnostic.CA1502.severity = warning
# Avoid unmaintainable code
dotnet_diagnostic.CA1505.severity = warning
# Avoid excessive class coupling
dotnet_diagnostic.CA1506.severity = warning
# Use nameof in place of string
dotnet_diagnostic.CA1507.severity = warning
# Avoid dead conditional code
dotnet_diagnostic.CA1508.severity = warning
# Invalid entry in code metrics configuration file
dotnet_diagnostic.CA1509.severity = warning
# Use ArgumentNullException throw helper
dotnet_diagnostic.CA1510.severity = warning
# Use ArgumentException throw helper
dotnet_diagnostic.CA1511.severity = warning
# Use ArgumentOutOfRangeException throw helper
dotnet_diagnostic.CA1512.severity = warning
# Use ObjectDisposedException throw helper
dotnet_diagnostic.CA1513.severity = warning
# Avoid redundant length argument
dotnet_diagnostic.CA1514.severity = warning
# Consider making public types internal
dotnet_diagnostic.CA1515.severity = warning
# Naming ##################################################################################################################################
# Do not name enum values 'Reserved'
dotnet_diagnostic.CA1700.severity = warning
# Identifiers should not contain underscores
dotnet_diagnostic.CA1707.severity = warning
# Identifiers should differ by more than case
dotnet_diagnostic.CA1708.severity = warning
# Identifiers should have correct suffix
dotnet_diagnostic.CA1710.severity = warning
# Identifiers should not have incorrect suffix
dotnet_diagnostic.CA1711.severity = warning
# Do not prefix enum values with type name
dotnet_diagnostic.CA1712.severity = warning
# Events should not have 'Before' or 'After' prefix
dotnet_diagnostic.CA1713.severity = warning
# Flags enums should have plural names
dotnet_diagnostic.CA1714.severity = warning
# Identifiers should have correct prefix
dotnet_diagnostic.CA1715.severity = warning
# Identifiers should not match keywords
dotnet_diagnostic.CA1716.severity = warning
# Only FlagsAttribute enums should have plural names
dotnet_diagnostic.CA1717.severity = warning
# Identifiers should not contain type names
dotnet_diagnostic.CA1720.severity = warning
# Property names should not match get methods
dotnet_diagnostic.CA1721.severity = warning
# Type names should not match namespaces
dotnet_diagnostic.CA1724.severity = warning
# Parameter names should match base declaration
dotnet_diagnostic.CA1725.severity = warning
# Use PascalCase for named placeholders
dotnet_diagnostic.CA1727.severity = warning
# Performance #############################################################################################################################
# Use literals where appropriate
dotnet_diagnostic.CA1802.severity = error
# Do not initialize unnecessarily
dotnet_diagnostic.CA1805.severity = error
# Do not ignore method results
dotnet_diagnostic.CA1806.severity = error
# Initialize reference type static fields inline
dotnet_diagnostic.CA1810.severity = error
# Avoid uninstantiated internal classes
dotnet_diagnostic.CA1812.severity = error
# Avoid unsealed attributes
dotnet_diagnostic.CA1813.severity = error
# Prefer jagged arrays over multidimensional
dotnet_diagnostic.CA1814.severity = error
# Override equals and operator equals on value types
dotnet_diagnostic.CA1815.severity = error
# Properties should not return arrays
dotnet_diagnostic.CA1819.severity = error
# Test for empty strings using string length
dotnet_diagnostic.CA1820.severity = error
# Remove empty finalizers
dotnet_diagnostic.CA1821.severity = error
# Mark members as static
dotnet_diagnostic.CA1822.severity = error
# Avoid unused private fields
dotnet_diagnostic.CA1823.severity = error
# Mark assemblies with NeutralResourcesLanguageAttribute
dotnet_diagnostic.CA1824.severity = error
# Avoid zero-length array allocations.
dotnet_diagnostic.CA1825.severity = error
# Use property instead of Linq Enumerable method
dotnet_diagnostic.CA1826.severity = error
# Do not use Count() or LongCount() when Any() can be used
dotnet_diagnostic.CA1827.severity = error
# Do not use CountAsync() or LongCountAsync() when AnyAsync() can be used
dotnet_diagnostic.CA1828.severity = error
# Use Length/Count property instead of Enumerable.Count() method
dotnet_diagnostic.CA1829.severity = error
# Prefer strongly-typed Append and Insert method overloads on StringBuilder
dotnet_diagnostic.CA1830.severity = error
# Use AsSpan or AsMemory instead of Range-based indexers when appropriate
dotnet_diagnostic.CA1831.severity = error
# Use AsSpan or AsMemory instead of Range-based indexers for getting ReadOnlySpan or ReadOnlyMemory portion of an array
dotnet_diagnostic.CA1832.severity = error
# Use AsSpan or AsMemory instead of Range-based indexers for getting Span or Memoty portion of an array
dotnet_diagnostic.CA1833.severity = error
# Use StringBuilder.Append(char) for single character strings
dotnet_diagnostic.CA1834.severity = error
# Prefer the 'Memory'-based overloads for 'ReadAsync' and 'WriteAsync'
dotnet_diagnostic.CA1835.severity = error
# Prefer IsEmpty over Count when available
dotnet_diagnostic.CA1836.severity = error
# Use 'Environment.ProcessId' instead of 'Process.GetCurrentProcess().Id'
dotnet_diagnostic.CA1837.severity = error
# Avoid 'StringBuilder' parameters for P/Invokes
dotnet_diagnostic.CA1838.severity = error
# Use 'Environment.ProcessPath' instead of 'Process.GetCurrentProcess().MainModule.FileName'
dotnet_diagnostic.CA1839.severity = error
# Use 'Environment.CurrentManagedThreadId' instead of 'Thread.CurrentThread.ManagedThreadId'
dotnet_diagnostic.CA1840.severity = error
# Prefer Dictionary Contains methods
dotnet_diagnostic.CA1841.severity = error
# Do not use 'WhenAll' with a single task
dotnet_diagnostic.CA1842.severity = error
# Do not use 'WaitAll' with a single task
dotnet_diagnostic.CA1843.severity = error
# Provide memory-based overrides of async methods when subclassing 'Stream'
dotnet_diagnostic.CA1844.severity = error
# Use span-based 'string.Concat'
dotnet_diagnostic.CA1845.severity = error
# Prefer AsSpan over Substring
dotnet_diagnostic.CA1846.severity = error
# Use char literal for a single character lookup
dotnet_diagnostic.CA1847.severity = error
# Use the LoggerMessage delegates
dotnet_diagnostic.CA1848.severity = error
# Call async methods when in an async method
dotnet_diagnostic.CA1849.severity = error
# Prefer static HashData method over ComputeHash
dotnet_diagnostic.CA1850.severity = error
# Possible multiple enumerations of IEnumerable collection
dotnet_diagnostic.CA1851.severity = error
# Seal internal types
dotnet_diagnostic.CA1852.severity = error
# Unnecessary call to 'Dictionary.ContainsKey(key)'
dotnet_diagnostic.CA1853.severity = error
# Prefer the IDictionary.TryGetValue(TKey, out TValue) method
dotnet_diagnostic.CA1854.severity = error
# Use Span<T>.Clear() instead of Span<T>.Fill()
dotnet_diagnostic.CA1855.severity = error
# Use StartsWith instead of IndexOf
dotnet_diagnostic.CA1858.severity = error
# Use concrete types when possible for improved performance
dotnet_diagnostic.CA1859.severity = error
# Avoid using 'Enumerable.Any()' extension method
dotnet_diagnostic.CA1860.severity = error
# Avoid constant arrays as arguments
dotnet_diagnostic.CA1861.severity = error
# Use the 'StringComparison' method overloads to perform case-insensitive string comparisons
dotnet_diagnostic.CA1862.severity = error
# Use 'CompositeFormat'
dotnet_diagnostic.CA1863.severity = error
# Prefer the 'IDictionary.TryAdd(TKey, TValue)' method
dotnet_diagnostic.CA1864.severity = error
# Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char
dotnet_diagnostic.CA1865.severity = error
# Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char
dotnet_diagnostic.CA1866.severity = error
# Use 'string.Method(char)' instead of 'string.Method(string)' for string with single char
dotnet_diagnostic.CA1867.severity = error
# Unnecessary call to 'Contains' for sets
dotnet_diagnostic.CA1868.severity = error
# Cache and reuse 'JsonSerializerOptions' instances
dotnet_diagnostic.CA1869.severity = error
# Use a cached 'SearchValues' instance
dotnet_diagnostic.CA1870.severity = error
# SingleFile ##############################################################################################################################
# Avoid accessing Assembly file path when publishing as a single file
dotnet_diagnostic.IL3000.severity = error
# Avoid accessing Assembly file path when publishing as a single file
dotnet_diagnostic.IL3001.severity = error
# Avoid calling members annotated with 'RequiresAssemblyFilesAttribute' when publishing as a single file
dotnet_diagnostic.IL3002.severity = error
# 'RequiresAssemblyFilesAttribute' annotations must match across all interface implementations or overrides
dotnet_diagnostic.IL3003.severity = error
# Reliability #############################################################################################################################
# Dispose objects before losing scope
dotnet_diagnostic.CA2000.severity = error
# Do not lock on objects with weak identity
dotnet_diagnostic.CA2002.severity = error
# Do not directly await a Task
dotnet_diagnostic.CA2007.severity = error
# Do not create tasks without passing a TaskScheduler
dotnet_diagnostic.CA2008.severity = error
# Do not call ToImmutableCollection on an ImmutableCollection value
dotnet_diagnostic.CA2009.severity = error
# Do not assign property within its setter
dotnet_diagnostic.CA2011.severity = error
# Use ValueTasks correctly
dotnet_diagnostic.CA2012.severity = error
# Do not use ReferenceEquals with value types
dotnet_diagnostic.CA2013.severity = error
# Do not use stackalloc in loops
dotnet_diagnostic.CA2014.severity = error
# Do not define finalizers for types derived from MemoryManager<T>
dotnet_diagnostic.CA2015.severity = error
# Forward the 'CancellationToken' parameter to methods that take one
dotnet_diagnostic.CA2016.severity = error
# Parameter count mismatch
dotnet_diagnostic.CA2017.severity = error
# The count argument to Buffer.BlockCopy should specify the number of bytes to copy
dotnet_diagnostic.CA2018.severity = error
# ThreadStatic fields should not use inline initialization
dotnet_diagnostic.CA2019.severity = error
# Prevent behavioral change caused by built-in operators of IntPtr/UIntPtr
dotnet_diagnostic.CA2020.severity = error
# Don't call Enumerable.Cast<T> or Enumerable.OfType<T> with incompatible types
dotnet_diagnostic.CA2021.severity = error
# Security ################################################################################################################################
# Review SQL queries for security vulnerabilities
dotnet_diagnostic.CA2100.severity = error
# Review visible event handlers
dotnet_diagnostic.CA2109.severity = error
# Seal methods that satisfy private interfaces
dotnet_diagnostic.CA2119.severity = error
# Avoid handling Corrupted State Exceptions
dotnet_diagnostic.CA2153.severity = error
# Do not use insecure deserializer BinaryFormatter
dotnet_diagnostic.CA2300.severity = error
# Do not call BinaryFormatter.Deserialize without first setting BinaryFormatter.Binder
dotnet_diagnostic.CA2301.severity = error
# Ensure BinaryFormatter.Binder is set before calling BinaryFormatter.Deserialize
dotnet_diagnostic.CA2302.severity = error
# Do not use insecure deserializer LosFormatter
dotnet_diagnostic.CA2305.severity = error
# Do not use insecure deserializer NetDataContractSerializer
dotnet_diagnostic.CA2310.severity = error
# Do not deserialize without first setting NetDataContractSerializer.Binder
dotnet_diagnostic.CA2311.severity = error
# Ensure NetDataContractSerializer.Binder is set before deserializing
dotnet_diagnostic.CA2312.severity = error
# Do not use insecure deserializer ObjectStateFormatter
dotnet_diagnostic.CA2315.severity = error
# Do not deserialize with JavaScriptSerializer using a SimpleTypeResolver
dotnet_diagnostic.CA2321.severity = error
# Ensure JavaScriptSerializer is not initialized with SimpleTypeResolver before deserializing
dotnet_diagnostic.CA2322.severity = error
# Do not use TypeNameHandling values other than None
dotnet_diagnostic.CA2326.severity = error
# Do not use insecure JsonSerializerSettings
dotnet_diagnostic.CA2327.severity = error
# Ensure that JsonSerializerSettings are secure
dotnet_diagnostic.CA2328.severity = error
# Do not deserialize with JsonSerializer using an insecure configuration
dotnet_diagnostic.CA2329.severity = error
# Ensure that JsonSerializer has a secure configuration when deserializing
dotnet_diagnostic.CA2330.severity = error
# Ensure DataTable.ReadXml()'s input is trusted
dotnet_diagnostic.CA2350.severity = error
# Ensure DataSet.ReadXml()'s input is trusted
dotnet_diagnostic.CA2351.severity = error
# Unsafe DataSet or DataTable in serializable type can be vulnerable to remote code execution attacks
dotnet_diagnostic.CA2352.severity = error
# Unsafe DataSet or DataTable in serializable type
dotnet_diagnostic.CA2353.severity = error
# Unsafe DataSet or DataTable in deserialized object graph can be vulnerable to remote code execution attacks
dotnet_diagnostic.CA2354.severity = error
# Unsafe DataSet or DataTable type found in deserializable object graph
dotnet_diagnostic.CA2355.severity = error
# Unsafe DataSet or DataTable type in web deserializable object graph
dotnet_diagnostic.CA2356.severity = error
# Ensure autogenerated class containing DataSet.ReadXml() is not used with untrusted data
dotnet_diagnostic.CA2361.severity = error
# Unsafe DataSet or DataTable in autogenerated serializable type can be vulnerable to remote code execution attacks
dotnet_diagnostic.CA2362.severity = error
# Review code for SQL injection vulnerabilities
dotnet_diagnostic.CA3001.severity = error
# Review code for XSS vulnerabilities
dotnet_diagnostic.CA3002.severity = error
# Review code for file path injection vulnerabilities
dotnet_diagnostic.CA3003.severity = error
# Review code for information disclosure vulnerabilities
dotnet_diagnostic.CA3004.severity = error
# Review code for LDAP injection vulnerabilities
dotnet_diagnostic.CA3005.severity = error
# Review code for process command injection vulnerabilities
dotnet_diagnostic.CA3006.severity = error
# Review code for open redirect vulnerabilities
dotnet_diagnostic.CA3007.severity = error
# Review code for XPath injection vulnerabilities
dotnet_diagnostic.CA3008.severity = error
# Review code for XML injection vulnerabilities
dotnet_diagnostic.CA3009.severity = error
# Review code for XAML injection vulnerabilities
dotnet_diagnostic.CA3010.severity = error
# Review code for DLL injection vulnerabilities
dotnet_diagnostic.CA3011.severity = error
# Review code for regex injection vulnerabilities
dotnet_diagnostic.CA3012.severity = error
# Do Not Add Schema By URL
dotnet_diagnostic.CA3061.severity = error
# Insecure DTD processing in XML
dotnet_diagnostic.CA3075.severity = error
# Insecure XSLT script processing.
dotnet_diagnostic.CA3076.severity = error
# Insecure Processing in API Design, XmlDocument and XmlTextReader
dotnet_diagnostic.CA3077.severity = error
# Mark Verb Handlers With Validate Antiforgery Token
dotnet_diagnostic.CA3147.severity = error
# Do Not Use Weak Cryptographic Algorithms
dotnet_diagnostic.CA5350.severity = error
# Do Not Use Broken Cryptographic Algorithms
dotnet_diagnostic.CA5351.severity = error
# Do Not Use Unsafe Cipher Modes
dotnet_diagnostic.CA5358.severity = error
# Do Not Disable Certificate Validation
dotnet_diagnostic.CA5359.severity = error
# Do Not Call Dangerous Methods In Deserialization
dotnet_diagnostic.CA5360.severity = error
# Do Not Disable SChannel Use of Strong Crypto
dotnet_diagnostic.CA5361.severity = error
# Potential reference cycle in deserialized object graph
dotnet_diagnostic.CA5362.severity = error
# Do Not Disable Request Validation
dotnet_diagnostic.CA5363.severity = error
# Do Not Use Deprecated Security Protocols
dotnet_diagnostic.CA5364.severity = error
# Do Not Disable HTTP Header Checking
dotnet_diagnostic.CA5365.severity = error
# Use XmlReader For DataSet Read Xml
dotnet_diagnostic.CA5366.severity = error
# Do Not Serialize Types With Pointer Fields
dotnet_diagnostic.CA5367.severity = error
# Set ViewStateUserKey For Classes Derived From Page
dotnet_diagnostic.CA5368.severity = error
# Use XmlReader For Deserialize
dotnet_diagnostic.CA5369.severity = error
# Use XmlReader For Validating Reader
dotnet_diagnostic.CA5370.severity = error
# Use XmlReader For Schema Read
dotnet_diagnostic.CA5371.severity = error
# Use XmlReader For XPathDocument
dotnet_diagnostic.CA5372.severity = error
# Do not use obsolete key derivation function
dotnet_diagnostic.CA5373.severity = error
# Do Not Use XslTransform
dotnet_diagnostic.CA5374.severity = error
# Do Not Use Account Shared Access Signature
dotnet_diagnostic.CA5375.severity = error
# Use SharedAccessProtocol HttpsOnly
dotnet_diagnostic.CA5376.severity = error
# Use Container Level Access Policy
dotnet_diagnostic.CA5377.severity = error
# Do not disable ServicePointManagerSecurityProtocols
dotnet_diagnostic.CA5378.severity = error
# Do Not Use Weak Key Derivation Function Algorithm
dotnet_diagnostic.CA5379.severity = error
# Do Not Add Certificates To Root Store
dotnet_diagnostic.CA5380.severity = error
# Ensure Certificates Are Not Added To Root Store
dotnet_diagnostic.CA5381.severity = error
# Use Secure Cookies In ASP.Net Core
dotnet_diagnostic.CA5382.severity = error
# Ensure Use Secure Cookies In ASP.Net Core
dotnet_diagnostic.CA5383.severity = error
# Do Not Use Digital Signature Algorithm (DSA)
dotnet_diagnostic.CA5384.severity = error
# Use RivestShamirAdleman (RSA) Algorithm With Sufficient Key Size
dotnet_diagnostic.CA5385.severity = error
# Avoid hardcoding SecurityProtocolType value
dotnet_diagnostic.CA5386.severity = error
# Do Not Use Weak Key Derivation Function With Insufficient Iteration Count
dotnet_diagnostic.CA5387.severity = error
# Ensure Sufficient Iteration Count When Using Weak Key Derivation Function
dotnet_diagnostic.CA5388.severity = error
# Do Not Add Archive Item's Path To The Target File System Path
dotnet_diagnostic.CA5389.severity = error
# Do not hard-code encryption key
dotnet_diagnostic.CA5390.severity = error
# Use antiforgery tokens in ASP.NET Core MVC controllers
dotnet_diagnostic.CA5391.severity = error
# Use DefaultDllImportSearchPaths attribute for P/Invokes
dotnet_diagnostic.CA5392.severity = error
# Do not use unsafe DllImportSearchPath value
dotnet_diagnostic.CA5393.severity = error
# Do not use insecure randomness
dotnet_diagnostic.CA5394.severity = error
# Miss HttpVerb attribute for action methods
dotnet_diagnostic.CA5395.severity = error
# Set HttpOnly to true for HttpCookie
dotnet_diagnostic.CA5396.severity = error
# Do not use deprecated SslProtocols values
dotnet_diagnostic.CA5397.severity = error
# Avoid hardcoded SslProtocols values
dotnet_diagnostic.CA5398.severity = error
# HttpClients should enable certificate revocation list checks
dotnet_diagnostic.CA5399.severity = error
# Ensure HttpClient certificate revocation list check is not disabled
dotnet_diagnostic.CA5400.severity = error
# Do not use CreateEncryptor with non-default IV
dotnet_diagnostic.CA5401.severity = error
# Use CreateEncryptor with the default IV
dotnet_diagnostic.CA5402.severity = error
# Do not hard-code certificate
dotnet_diagnostic.CA5403.severity = error
# Do not disable token validation checks
dotnet_diagnostic.CA5404.severity = error
# Do not always skip token validation in delegates
dotnet_diagnostic.CA5405.severity = error
# Usage ###################################################################################################################################
# Review unused parameters
dotnet_diagnostic.CA1801.severity = warning
# Call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1816.severity = error
# Rethrow to preserve stack details.
dotnet_diagnostic.CA2200.severity = error
# Do not raise reserved exception types
dotnet_diagnostic.CA2201.severity = error
# Initialize value type static fields inline
dotnet_diagnostic.CA2207.severity = error
# Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = error
# Non-constant fields should not be visible
dotnet_diagnostic.CA2211.severity = error
# Disposable fields should be disposed
dotnet_diagnostic.CA2213.severity = error
# Do not call overridable methods in constructors
dotnet_diagnostic.CA2214.severity = error
# Dispose methods should call base class dispose
dotnet_diagnostic.CA2215.severity = error
# Disposable types should declare finalizer
dotnet_diagnostic.CA2216.severity = error
# Do not mark enums with FlagsAttribute
dotnet_diagnostic.CA2217.severity = error
# Override GetHashCode on overriding Equals
dotnet_diagnostic.CA2218.severity = error
# Do not raise exceptions in exception clauses
dotnet_diagnostic.CA2219.severity = error
# Override Equals on overloading operator equals
dotnet_diagnostic.CA2224.severity = error
# Operator overloads have named alternates
dotnet_diagnostic.CA2225.severity = error
# Operators should have symmetrical overloads
dotnet_diagnostic.CA2226.severity = error
# Collection properties should be read only
dotnet_diagnostic.CA2227.severity = error
# Implement serialization constructors
dotnet_diagnostic.CA2229.severity = error
# Overload operator equals on overriding value type Equals
dotnet_diagnostic.CA2231.severity = error
# Pass system uri objects instead of strings
dotnet_diagnostic.CA2234.severity = error
# Mark all non-serializable fields
dotnet_diagnostic.CA2235.severity = error
# Mark ISerializable types with serializable
dotnet_diagnostic.CA2237.severity = error
# Provide correct arguments to formatting methods
dotnet_diagnostic.CA2241.severity = error
# Test for NaN correctly
dotnet_diagnostic.CA2242.severity = error
# Attribute string literals should parse correctly
dotnet_diagnostic.CA2243.severity = error
# Do not duplicate indexed element initializations
dotnet_diagnostic.CA2244.severity = error
# Do not assign a property to itself.
dotnet_diagnostic.CA2245.severity = error
# Assigning symbol and its member in the same statement.
dotnet_diagnostic.CA2246.severity = error
# Argument passed to TaskCompletionSource constructor should be TaskCreationOptions enum instead of TaskContinuationOptions enum
dotnet_diagnostic.CA2247.severity = error
# Provide correct 'enum' argument to 'Enum.HasFlag'
dotnet_diagnostic.CA2248.severity = error
# Consider using 'string.Contains' instead of 'string.IndexOf'
dotnet_diagnostic.CA2249.severity = error
# Use ThrowIfCancellationRequested
dotnet_diagnostic.CA2250.severity = error
# Use String.Equals over String.Compare
dotnet_diagnostic.CA2251.severity = error
# Opt in to preview features before using them
dotnet_diagnostic.CA2252.severity = error
# Named placeholders should not be numeric values
dotnet_diagnostic.CA2253.severity = error
# Template should be a static expression
dotnet_diagnostic.CA2254.severity = error
# The ModuleInitializer attribute should not be used in libraries
dotnet_diagnostic.CA2255.severity = error
# All members declared in parent interfaces must have an implementation in a DynamicInterfaceCastableImplementation-attributed interface
dotnet_diagnostic.CA2256.severity = error
# Members defined on an interface with the 'DynamicInterfaceCastableImplementationAttribute' should be 'static'
dotnet_diagnostic.CA2257.severity = error
# Providing a 'DynamicInterfaceCastableImplementation' interface in Visual Basic is unsupported
dotnet_diagnostic.CA2258.severity = error
# Ensure ThreadStatic is only used with static fields
dotnet_diagnostic.CA2259.severity = error
# Implement generic math interfaces correctly
dotnet_diagnostic.CA2260.severity = error
# Do not use ConfigureAwaitOptions.SuppressThrowing with Task<TResult>
dotnet_diagnostic.CA2261.severity = error
# Others ##################################################################################################################################
# Analyzer version mismatch
dotnet_diagnostic.CA9999.severity = warning
###########################################################################################################################################
# Microsoft.VisualStudio.Threading.Analyzers #
# https://github.com/microsoft/vs-threading/blob/main/doc/analyzers/index.md #
###########################################################################################################################################
# Avoid legacy thread switching methods
dotnet_diagnostic.VSTHRD001.severity = error
# Avoid problematic synchronous waits
dotnet_diagnostic.VSTHRD002.severity = error
# Avoid awaiting foreign Tasks
dotnet_diagnostic.VSTHRD003.severity = error
# Await SwitchToMainThreadAsync
dotnet_diagnostic.VSTHRD004.severity = error
# Invoke single-threaded types on Main thread
dotnet_diagnostic.VSTHRD010.severity = error
# Use AsyncLazy<T>
dotnet_diagnostic.VSTHRD011.severity = error
# Provide JoinableTaskFactory where allowed
dotnet_diagnostic.VSTHRD012.severity = error
# Avoid async void methods
dotnet_diagnostic.VSTHRD100.severity = error
# Avoid unsupported async delegates
dotnet_diagnostic.VSTHRD101.severity = error
# Implement internal logic asynchronously
dotnet_diagnostic.VSTHRD102.severity = error
# Call async methods when in an async method
dotnet_diagnostic.VSTHRD103.severity = error
# Offer async option
dotnet_diagnostic.VSTHRD104.severity = error
# Avoid method overloads that assume TaskScheduler.Current
dotnet_diagnostic.VSTHRD105.severity = error
# Use InvokeAsync to raise async events
dotnet_diagnostic.VSTHRD106.severity = error
# Await Task within using expression
dotnet_diagnostic.VSTHRD107.severity = error
# Assert thread affinity unconditionally
dotnet_diagnostic.VSTHRD108.severity = error
# Switch instead of assert in async methods
dotnet_diagnostic.VSTHRD109.severity = error
# Observe result of async calls
dotnet_diagnostic.VSTHRD110.severity = error
# Use .ConfigureAwait(bool)
# - Configured by CA2007
dotnet_diagnostic.VSTHRD111.severity = none
# Implement System.IAsyncDisposable
dotnet_diagnostic.VSTHRD112.severity = error
# Check for System.IAsyncDisposable
dotnet_diagnostic.VSTHRD113.severity = error
# Avoid returning null from a Task-returning method.
dotnet_diagnostic.VSTHRD114.severity = error
# Use Async naming convention
# - Configured by Naming Conventions
dotnet_diagnostic.VSTHRD200.severity = none
###########################################################################################################################################
# StyleCop #
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/DOCUMENTATION.md #
###########################################################################################################################################
# Intentionally disabled rules:
# https://github.com/DotNetAnalyzers/StyleCopAnalyzers/blob/master/documentation/KnownChanges.md#disabled-rules
[*.cs]
# Special Rules ###########################################################################################################################
# All diagnostics of XML documentation comments has been disabled due to the current project configuration.
dotnet_diagnostic.SA0001.severity = none
# The **stylecop.json** settings file could not be loaded due to a deserialization error.
dotnet_diagnostic.SA0002.severity = warning
# Spacing Rules ###########################################################################################################################
# The spacing around a C# keyword is incorrect.
# - Configured by Visual Studio
dotnet_diagnostic.SA1000.severity = none
# The spacing around a comma is incorrect, within a C# code file.
# - Configured by Visual Studio
dotnet_diagnostic.SA1001.severity = none
# The spacing around a semicolon is incorrect, within a C# code file.
# - Configured by Visual Studio
dotnet_diagnostic.SA1002.severity = none
# The spacing around an operator symbol is incorrect, within a C# code file.
# - Configured by Visual Studio
dotnet_diagnostic.SA1003.severity = none
# A line within a documentation header above a C# element does not begin with a single space.
dotnet_diagnostic.SA1004.severity = warning
# A single-line comment within a C# code file does not begin with a single space.
dotnet_diagnostic.SA1005.severity = warning
# A C# preprocessor-type keyword is preceded by space.
dotnet_diagnostic.SA1006.severity = warning
# The operator keyword within a C# operator overload method is not followed by any whitespace.
# - Configured by Visual Studio
dotnet_diagnostic.SA1007.severity = none
# An opening parenthesis within a C# statement is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1008.severity = none
# A closing parenthesis within a C# statement is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1009.severity = none
# An opening square bracket within a C# statement is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1010.severity = none
# A closing square bracket within a C# statement is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1011.severity = none
# An opening brace within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1012.severity = none
# A closing brace within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1013.severity = none
# An opening generic bracket within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1014.severity = none
# A closing generic bracket within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1015.severity = none
# An opening attribute bracket within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1016.severity = none
# A closing attribute bracket within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1017.severity = none
# A nullable type symbol within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1018.severity = none
# The spacing around a member access symbol is incorrect, within a C# code file.
# - Configured by Visual Studio
dotnet_diagnostic.SA1019.severity = none
# An increment or decrement symbol within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1020.severity = none
# A negative sign within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1021.severity = none
# A positive sign within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1022.severity = none
# A dereference symbol or an access-of symbol within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1023.severity = none
# A colon within a C# element is not spaced correctly.
# - Configured by Visual Studio
dotnet_diagnostic.SA1024.severity = none
# The code contains multiple whitespace characters in a row.
dotnet_diagnostic.SA1025.severity = warning
# An implicitly typed new array allocation within a C# code file is not spaced correctly.
dotnet_diagnostic.SA1026.severity = warning
# The code contains a tab or space character which is not consistent with the current project settings.
dotnet_diagnostic.SA1027.severity = warning
# A line of code ends with a space, tab, or other whitespace characters before the end of line character(s).
# - Configured by Visual Studio
dotnet_diagnostic.SA1028.severity = none
# Readability Rules #######################################################################################################################
# A call to a member from an inherited class begins with `base.`, and the local class does not contain an override or implementation of the
# member.
dotnet_diagnostic.SA1100.severity = warning
# A call to an instance member of the local class or a base class is not prefixed with 'this.', within a C# code file.
# - Configured by Visual Studio
dotnet_diagnostic.SA1101.severity = none
# A C# query clause does not begin on the same line as the previous clause, or on the next line.
dotnet_diagnostic.SA1102.severity = warning
# The clauses within a C# query expression are not all placed on the same line, and each clause is not placed on its own line.
dotnet_diagnostic.SA1103.severity = warning
# A clause within a C# query expression begins on the same line as the previous clause, when the previous clause spans across multiple
# lines.
dotnet_diagnostic.SA1104.severity = warning
# A clause within a C# query expression spans across multiple lines, and does not begin on its own line.
dotnet_diagnostic.SA1105.severity = warning
# The C# code contains an extra semicolon.
dotnet_diagnostic.SA1106.severity = warning
# The C# code contains more than one statement on a single line.
dotnet_diagnostic.SA1107.severity = warning
# A C# statement contains a comment between the declaration of the statement and the opening brace of the statement.
dotnet_diagnostic.SA1108.severity = warning
# A C# statement contains a region tag between the declaration of the statement and the opening brace of the statement.
# Intentionally disabled by StyleCop
dotnet_diagnostic.SA1109.severity = none
# The opening parenthesis or bracket in a call to a C# method or indexer, or the declaration of a method or indexer, is not placed on the
# same line as the method or indexer name
dotnet_diagnostic.SA1110.severity = warning
# The closing parenthesis or bracket in a call to a C# method or indexer, or the declaration of a method or indexer, is not placed on the
# same line as the last parameter.
dotnet_diagnostic.SA1111.severity = warning
# The closing parenthesis or bracket in a call to a C# method or indexer, or the declaration of a method or indexer, is not placed on the
# same line as the opening bracket when the element does not take any parameters.
dotnet_diagnostic.SA1112.severity = warning
# A comma between two parameters in a call to a C# method or indexer, or in the declaration of a method or indexer, is not placed on the
# same line as the previous parameter.
dotnet_diagnostic.SA1113.severity = warning
# The start of the parameter list for a method or indexer call or declaration does not begin on the same line as the opening bracket, or on
# the line after the opening bracket.
dotnet_diagnostic.SA1114.severity = warning
# A parameter within a C# method or indexer call or declaration does not begin on the same line as the previous parameter, or on the next
# line.
dotnet_diagnostic.SA1115.severity = warning
# The parameters to a C# method or indexer call or declaration span across multiple lines, but the first parameter does not start on the
# line after the opening bracket.
dotnet_diagnostic.SA1116.severity = warning
# The parameters to a C# method or indexer call or declaration are not all on the same line or each on a separate line.
dotnet_diagnostic.SA1117.severity = warning
# A parameter to a C# method or indexer, other than the first parameter, spans across multiple lines.
dotnet_diagnostic.SA1118.severity = warning
# The C# comment does not contain any comment text.
dotnet_diagnostic.SA1120.severity = warning
# The code uses one of the basic C# types, but does not use the built-in alias for the type.
# - Configurd by Visual Studio
dotnet_diagnostic.SA1121.severity = none
# The C# code includes an empty string, written as `""`.
dotnet_diagnostic.SA1122.severity = warning
# The C# code contains a region within the body of a code element.
# - Covered by SA1124
dotnet_diagnostic.SA1123.severity = none
# The C# code contains a region.
dotnet_diagnostic.SA1124.severity = warning
# The Nullable type has been defined not using the C# shorthand
dotnet_diagnostic.SA1125.severity = warning
# A call to a member is not prefixed with the 'this.', 'base.', 'object.' or 'typename.' prefix to indicate the intended method call,
# within a C# code file.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1126.severity = none
# A generic constraint on a type or method declaration is on the same line as the declaration, within a C# code file.
dotnet_diagnostic.SA1127.severity = warning
# A constructor initializer is on the same line as the constructor declaration, within a C# code file.
dotnet_diagnostic.SA1128.severity = warning
# A value type was constructed using the syntax `new T()`.
dotnet_diagnostic.SA1129.severity = warning
# An anonymous method was declared using the form `delegate (parameters) { }`, when a lambda expression would provide equivalent behavior
# with the syntax `(parameters) => { }`
dotnet_diagnostic.SA1130.severity = warning
# A comparison was made between a variable and a literal or constant value, and the variable appeared on the right-hand side of the
# expression
dotnet_diagnostic.SA1131.severity = warning
# Two or more fields were declared in the same field declaration syntax.
dotnet_diagnostic.SA1132.severity = warning
# Two or more attributes appeared within the same set of square brackets.
dotnet_diagnostic.SA1133.severity = warning
# An attribute is placed on the same line of code as another attribute or element.
dotnet_diagnostic.SA1134.severity = warning
# A using directive is not qualified
dotnet_diagnostic.SA1135.severity = warning
# Multiple enum values are placed on the same line of code.
dotnet_diagnostic.SA1136.severity = warning
# Two sibling elements which each start on their own line have different levels of indentation
dotnet_diagnostic.SA1137.severity = warning
# Use literal suffix notation instead of casting.
dotnet_diagnostic.SA1139.severity = warning
# Use tuple syntax instead of the underlying ValueTuple implementation type
dotnet_diagnostic.SA1141.severity = warning
# An element of a tuple was referenced by its metadata name when an element name is available
dotnet_diagnostic.SA1142.severity = warning
# Ordering Rules ##########################################################################################################################
# A C# using directive is placed inside of a namespace element.
# - Configured by Visual Studio
dotnet_diagnostic.SA1200.severity = none
# An element within a C# code file is out of order in relation to the other elements in the code.
dotnet_diagnostic.SA1201.severity = warning
# An element within a C# code file is out of order within regard to access level, in relation to other elements in the code
dotnet_diagnostic.SA1202.severity = none
# A constant field is placed beneath a non-constant field.
dotnet_diagnostic.SA1203.severity = warning
# A static element is positioned beneath an instance element of the same type.
dotnet_diagnostic.SA1204.severity = none
# The partial element does not have an access modifier defined.
dotnet_diagnostic.SA1205.severity = warning
# The keywords within the declaration of an element do not follow a standard ordering scheme.
# - Configured by Visual Studio
dotnet_diagnostic.SA1206.severity = none
# The keyword *protected* is positioned after the keyword *internal* within the declaration of a protected internal C# element.
# - Configured by Visual Studio
dotnet_diagnostic.SA1207.severity = none
# A using directive which declares a member of the *System* namespace appears after a using directive which declares a member of a
# different namespace, within a C# code file.
# - Configured by Visual Studio
dotnet_diagnostic.SA1208.severity = none
# A using-alias directive is positioned before a regular using directive.
dotnet_diagnostic.SA1209.severity = warning
# The using directives within a C# code file are not sorted alphabetically by namespace.
dotnet_diagnostic.SA1210.severity = warning
# The using-alias directives within a C# code file are not sorted alphabetically by alias name.
dotnet_diagnostic.SA1211.severity = warning
# A get accessor appears after a set accessor within a property or indexer.
dotnet_diagnostic.SA1212.severity = warning
# An add accessor appears after a remove accessor within an event.
dotnet_diagnostic.SA1213.severity = warning
# A readonly field is positioned beneath a non-readonly field.
dotnet_diagnostic.SA1214.severity = none
# An instance readonly element is positioned beneath an instance non-readonly element of the same type.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1215.severity = none
# A `using static` directive is positioned at the wrong location (before a regular using directive or after an alias using directive).
dotnet_diagnostic.SA1216.severity = warning
# The `using static` directives within a C# code file are not sorted alphabetically by full type name.
dotnet_diagnostic.SA1217.severity = warning
# Naming Rules ############################################################################################################################
# The name of a C# element does not begin with an upper-case letter.
# - Configured by Naming Conventions
dotnet_diagnostic.SA1300.severity = none
# There are currently no situations in which this rule will fire.
dotnet_diagnostic.SA1301.severity = none
# The name of a C# interface does not begin with the capital letter I.
# - Configured by Naming Conventions
dotnet_diagnostic.SA1302.severity = none
# The name of a constant C# field should begin with an upper-case letter.
# - Configured by Naming Conventions
dotnet_diagnostic.SA1303.severity = none
# The name of a non-private readonly C# field should being with an upper-case letter.
# - Configured by Naming Conventions
dotnet_diagnostic.SA1304.severity = none
# The name of a field or variable in C# uses Hungarian notation.
# - This rule just disallows names with a 2 or less characters segment at the beginning (z.B. "saUsa" => Violation)
dotnet_diagnostic.SA1305.severity = none
# The name of a field in C# does not begin with a lower-case letter.
# - Configured by Naming Conventions
dotnet_diagnostic.SA1306.severity = none
# The name of a public or internal field in C# does not begin with an upper-case letter.
# - Configured by Naming Conventions
dotnet_diagnostic.SA1307.severity = none
# A field name in C# is prefixed with *m_* or *s_*.
# - Configured by Visual Studio
dotnet_diagnostic.SA1308.severity = none
# A field name in C# begins with an underscore.
# - Configured by Visual Studio
dotnet_diagnostic.SA1309.severity = none
# A field name in C# contains an underscore.
dotnet_diagnostic.SA1310.severity = warning
# The name of a static readonly field does not begin with an upper-case letter.
# - Configured by Naming Conventions
dotnet_diagnostic.SA1311.severity = none
# The name of a variable in C# does not begin with a lower-case letter.
# - Configured by Naming Conventions
dotnet_diagnostic.SA1312.severity = none
# The name of a parameter in C# does not begin with a lower-case letter.
# - Configured by Naming Conventions
dotnet_diagnostic.SA1313.severity = none
# The name of a C# type parameter does not begin with the capital letter T
# - Configured by Naming Conventions
dotnet_diagnostic.SA1314.severity = none
# Element names within a tuple type should have the correct casing
dotnet_diagnostic.SA1316.severity = warning
# Maintainability #########################################################################################################################
# A C# statement contains parenthesis which are unnecessary and should be removed.
# - Configured by Visual Studio
dotnet_diagnostic.SA1119.severity = none
# The access modifier for a C# element has not been explicitly defined.
# - Configured by Visual Studio
dotnet_diagnostic.SA1400.severity = none
# A field within a C# class has an access modifier other than private.
# - Configured by CA1051
dotnet_diagnostic.SA1401.severity = none
# A C# code file contains more than one unique type.
dotnet_diagnostic.SA1402.severity = warning
# A C# code file contains more than one namespace.
dotnet_diagnostic.SA1403.severity = warning
# A Code Analysis SuppressMessage attribute does not include a justification.
dotnet_diagnostic.SA1404.severity = warning
# A call to Debug.Assert in C# code does not include a descriptive message.
dotnet_diagnostic.SA1405.severity = warning
# A call to Debug.Fail in C# code does not include a descriptive message.
dotnet_diagnostic.SA1406.severity = warning
# A C# statement contains a complex arithmetic expression which omits parenthesis around operators.
# - Configured by Visual Studio
dotnet_diagnostic.SA1407.severity = none
# A C# statement contains a complex conditional expression which omits parenthesis around operators.
# - Configured by Visual Studio
dotnet_diagnostic.SA1408.severity = none
# A C# file contains code which is unnecessary and can be removed without changing the overall logic of the code.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1409.severity = none
# A call to a C# anonymous method does not contain any method parameters, yet the statement still includes parenthesis.
dotnet_diagnostic.SA1410.severity = warning
# An attribute declaration does not contain any parameters, yet it still includes parenthesis.
dotnet_diagnostic.SA1411.severity = warning
# The encoding of the file is not UTF-8 with byte order mark.
dotnet_diagnostic.SA1412.severity = none
# A multi-line initializer should use a comma on the last item.
dotnet_diagnostic.SA1413.severity = warning
# Tuple types appearing in member declarations should have explicitly named tuple elements
dotnet_diagnostic.SA1414.severity = warning
# Layout Rules ############################################################################################################################
# The opening or closing brace within a C# statement, element, or expression is not placed on its own line.
# - Configured by Visual Studio, but not in Error List
dotnet_diagnostic.SA1500.severity = warning
# A C# statement containing opening and closing braces is written completely on a single line.
# - Configured by Visual Studio, but not in Error List
dotnet_diagnostic.SA1501.severity = warning
# A C# element containing opening and closing braces is written completely on a single line.
# - Configured by Visual Studio, but not in Error List
dotnet_diagnostic.SA1502.severity = warning
# The opening and closing braces for a C# statement have been omitted.
# - Configured by Visual Studio
dotnet_diagnostic.SA1503.severity = none
# Within a C# property, indexer or event, at least one of the child accessors is written on a single line, and at least one of the child
# accessors is written across multiple lines.
dotnet_diagnostic.SA1504.severity = warning
# An opening brace within a C# element, statement, or expression is followed by a blank line.
dotnet_diagnostic.SA1505.severity = warning
# An element documentation header above a C# element is followed by a blank line.
dotnet_diagnostic.SA1506.severity = warning
# The C# code contains multiple blank lines in a row.
dotnet_diagnostic.SA1507.severity = warning
# A closing brace within a C# element, statement, or expression is preceded by a blank line.
dotnet_diagnostic.SA1508.severity = warning
# An opening brace within a C# element, statement, or expression is preceded by a blank line.
dotnet_diagnostic.SA1509.severity = warning
# Chained C# statements are separated by a blank line.
dotnet_diagnostic.SA1510.severity = warning
# The while footer at the bottom of a do-while statement is separated from the statement by a blank line.
dotnet_diagnostic.SA1511.severity = warning
# A single-line comment within C# code is followed by a blank line.
dotnet_diagnostic.SA1512.severity = warning
# A closing brace within a C# element, statement, or expression is not followed by a blank line.
dotnet_diagnostic.SA1513.severity = warning
# An element documentation header above a C# element is not preceded by a blank line.
dotnet_diagnostic.SA1514.severity = warning
# A single-line comment within C# code is not preceded by a blank line.
dotnet_diagnostic.SA1515.severity = warning
# Adjacent C# elements are not separated by a blank line.
dotnet_diagnostic.SA1516.severity = warning
# The code file has blank lines at the start.
dotnet_diagnostic.SA1517.severity = warning
# The line endings at the end of a file do not match the settings for the project.
dotnet_diagnostic.SA1518.severity = warning
# The opening and closing braces for a multi-line C# statement have been omitted.
# - Configured by Visual Studio
dotnet_diagnostic.SA1519.severity = none
# The opening and closing braces of a chained `if`/`else if`/`else` construct were included for some clauses, but omitted for others
# - Configured by Visual Studio
dotnet_diagnostic.SA1520.severity = none
# Documentation Rules #####################################################################################################################
# A C# code element is missing a documentation header.
dotnet_diagnostic.SA1600.severity = none
# A C# partial element is missing a documentation header.
dotnet_diagnostic.SA1601.severity = none
# An item within a C# enumeration is missing an Xml documentation header.
dotnet_diagnostic.SA1602.severity = none
# The Xml within a C# element's document header is badly formed.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1603.severity = none
# The Xml header documentation for a C# element is missing a `<summary>` tag.
dotnet_diagnostic.SA1604.severity = warning
# The `<summary>` or `<content>` tag within the documentation header for a C# code element is missing or empty.
dotnet_diagnostic.SA1605.severity = warning
# The `<summary>` tag within the documentation header for a C# code element is empty.
dotnet_diagnostic.SA1606.severity = warning
# The `<summary>` or `<content>` tag within the documentation header for a C# code element is empty.
dotnet_diagnostic.SA1607.severity = warning
# The `<summary>` tag within an element's Xml header documentation contains the default text generated by Visual Studio during the creation
# of the element.
dotnet_diagnostic.SA1608.severity = warning
# The Xml header documentation for a C# property does not contain a `<value>` tag.
dotnet_diagnostic.SA1609.severity = warning
# The Xml header documentation for a C# property contains an empty `<value>` tag.
dotnet_diagnostic.SA1610.severity = warning
# A C# method, constructor, delegate or indexer element is missing documentation for one or more of its parameters.
dotnet_diagnostic.SA1611.severity = warning
# The documentation describing the parameters to a C# method, constructor, delegate or indexer element does not match the actual parameters
# on the element.
dotnet_diagnostic.SA1612.severity = warning
# A `<param>` tag within a C# element's documentation header is missing a name attribute containing the name of the parameter.
dotnet_diagnostic.SA1613.severity = warning
# A `<param>` tag within a C# element's documentation header is empty.
dotnet_diagnostic.SA1614.severity = warning
# A C# element is missing documentation for its return value.
dotnet_diagnostic.SA1615.severity = warning
# The `<returns>` tag within a C# element's documentation header is empty.
dotnet_diagnostic.SA1616.severity = warning
# A C# code element does not contain a return value, or returns void, but the documentation header for the element contains a `<returns>`
# tag.
dotnet_diagnostic.SA1617.severity = warning
# A generic C# element is missing documentation for one or more of its generic type parameters.
dotnet_diagnostic.SA1618.severity = warning
# A generic, partial C# element is missing documentation for one or more of its generic type parameters, and the documentation for the
# element contains a `<summary>` tag.
dotnet_diagnostic.SA1619.severity = warning
# The `<typeparam>` tags within the Xml header documentation for a generic C# element do not match the generic type parameters on the element.
dotnet_diagnostic.SA1620.severity = warning
# A `<typeparam>` tag within the Xml header documentation for a generic C# element is missing a name attribute, or contains an empty name
# attribute.
dotnet_diagnostic.SA1621.severity = warning
# A `<typeparam>` tag within the Xml header documentation for a generic C# element is empty.
dotnet_diagnostic.SA1622.severity = warning
# The documentation text within a C# property's `<summary>` tag does not match the accessors within the property.
dotnet_diagnostic.SA1623.severity = warning
# The documentation text within a C# property's `<summary>` tag takes into account all of the accessors within the property, but one of the
# accessors has limited access.
dotnet_diagnostic.SA1624.severity = warning
# The Xml documentation for a C# element contains two or more identical entries, indicating that the documentation has been copied and
# pasted
dotnet_diagnostic.SA1625.severity = warning
# The C# code contains a single-line comment which begins with three forward slashes in a row.
dotnet_diagnostic.SA1626.severity = warning
# The Xml header documentation for a C# code element contains an empty tag.
dotnet_diagnostic.SA1627.severity = warning
# A section of the Xml header documentation for a C# element does not begin with a capital letter.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1628.severity = none
# A section of the Xml header documentation for a C# element does not end with a period (also known as a full stop).
dotnet_diagnostic.SA1629.severity = warning
# A section of the Xml header documentation for a C# element does not contain any whitespace between words.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1630.severity = none
# A section of the Xml header documentation for a C# element does not contain enough alphabetic characters.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1631.severity = none
# From StyleCop 4.5 this rule is disabled by default.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1632.severity = none
# A C# code file is missing a standard file header.
dotnet_diagnostic.SA1633.severity = none
# The file header at the top of a C# code file is missing a copyright tag.
dotnet_diagnostic.SA1634.severity = warning
# The file header at the top of a C# code file is missing copyright text.
dotnet_diagnostic.SA1635.severity = warning
# The file header at the top of a C# code file does not contain the appropriate copyright text.
dotnet_diagnostic.SA1636.severity = warning
# The file header at the top of a C# code file is missing the file name.
dotnet_diagnostic.SA1637.severity = warning
# The file tag within the file header at the top of a C# code file does not contain the name of the file.
dotnet_diagnostic.SA1638.severity = warning
# The file header at the top of a C# code file does not contain a filled-in summary tag.
dotnet_diagnostic.SA1639.severity = warning
# The file header at the top of a C# code file does not contain company name text.
dotnet_diagnostic.SA1640.severity = warning
# The file header at the top of a C# code file does not contain the appropriate company name text.
dotnet_diagnostic.SA1641.severity = warning
# The XML documentation header for a C# constructor does not contain the appropriate summary text.
dotnet_diagnostic.SA1642.severity = warning
# The Xml documentation header for a C# finalizer does not contain the appropriate summary text.
dotnet_diagnostic.SA1643.severity = warning
# A section within the Xml documentation header for a C# element contains blank lines.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1644.severity = none
# An included Xml documentation file does not exist.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1645.severity = none
# An included Xml documentation link contains an invalid path.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1646.severity = none
# An include tag within an Xml documentation header does not contain valid file and path attribute.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1647.severity = none
# `<inheritdoc>` has been used on an element that doesn't inherit from a base class or implement an interface.
dotnet_diagnostic.SA1648.severity = warning
# The file name of a C# code file does not match the first type declared in the file.
dotnet_diagnostic.SA1649.severity = warning
# The element documentation for the element contains one or more spelling mistakes or unrecognized words.
# - Intentionally disabled by StyleCop
dotnet_diagnostic.SA1650.severity = none
# The documentation for the element contains one or more `<placeholder>` elements.
dotnet_diagnostic.SA1651.severity = warning
# Alternative Rules #######################################################################################################################
# A call to an instance member of the local class or a base class is prefixed with 'this.', within a C# code file.
# - Conflicts with SA1101
dotnet_diagnostic.SX1101.severity = none
# A field name does not begin with an underscore.
# - Configured by Coding Conventions
dotnet_diagnostic.SX1309.severity = none
# A static field name does not begin with an underscore.
# - Configured by Coding Conventions
dotnet_diagnostic.SX1309S.severity = none
###########################################################################################################################################
# Roslynator #
# https://github.com/JosefPihrt/Roslynator #
###########################################################################################################################################
###########################################################################################################################################
# Roslynator Analyzers #
# https://github.com/JosefPihrt/Roslynator/blob/master/src/Analyzers/README.md #
###########################################################################################################################################
[*.cs]
# Add braces (when expression spans over multiple lines)
# - Conflicts with RCS1007
dotnet_diagnostic.RCS1001.severity = none
# Remove braces
# - Conflicts with RCS1007
dotnet_diagnostic.RCS1002.severity = none
# Add braces to if-else (when expression spans over multiple lines)
# - Conflicts with RCS1007
dotnet_diagnostic.RCS1003.severity = none
# Remove braces from if-else
# - Conflicts with RCS1007
dotnet_diagnostic.RCS1004.severity = none
# Simplify nested using statement
dotnet_diagnostic.RCS1005.severity = warning
# Merge else clause with nested if statement
dotnet_diagnostic.RCS1006.severity = warning
# Add braces
# - Configured by Visual Studio
dotnet_diagnostic.RCS1007.severity = none
# Use explicit type instead of 'var' (when the type is not obvious)
# - Configured in Visual Studio
dotnet_diagnostic.RCS1008.severity = none
# Use explicit type instead of 'var' (foreach variable)
# - Configured in Visual Studio
dotnet_diagnostic.RCS1009.severity = none
# Use 'var' instead of explicit type (when the type is obvious)
# - Configured in Visual Studio
dotnet_diagnostic.RCS1010.severity = none
# Use explicit type instead of 'var' (when the type is obvious)
# - Configured in Visual Studio
dotnet_diagnostic.RCS1012.severity = none
# Use predefined type
# - Configured in Visual Studio
dotnet_diagnostic.RCS1013.severity = none
# Use explicitly/implicitly typed array
dotnet_diagnostic.RCS1014.severity = warning
roslynator_array_creation_type_style = explicit
# Use nameof operator
# - Configured by CA1507
dotnet_diagnostic.RCS1015.severity = none
# Use expression-bodied member
# - Configured by Visual Studio
dotnet_diagnostic.RCS1016.severity = none
# Add accessibility modifiers
# - Configured by Visual Studio
dotnet_diagnostic.RCS1018.severity = none
roslynator_accessibility_modifiers = explicit
# Order modifiers
# - Configured by Visual Studio
dotnet_diagnostic.RCS1019.severity = none
# Simplify Nullable<T> to T?
# - Configured by SA1125
dotnet_diagnostic.RCS1020.severity = none
# Simplify lambda expression
# - Configured by Visual Studio
dotnet_diagnostic.RCS1021.severity = none
# Remove unnecessary braces
# - Configured by Visual Studio
dotnet_diagnostic.RCS1031.severity = none
# Remove redundant parentheses
# - Configured by Visual Studio
dotnet_diagnostic.RCS1032.severity = none
# Remove redundant boolean literal
dotnet_diagnostic.RCS1033.severity = warning
# Remove redundant 'sealed' modifier
dotnet_diagnostic.RCS1034.severity = warning
# Remove redundant empty line
# - Configured by SA1507
dotnet_diagnostic.RCS1036.severity = none
# Remove trailing white-space
# - Configured by SA1028
dotnet_diagnostic.RCS1037.severity = none
# Remove argument list from attribute
# - Configured by SA1411
dotnet_diagnostic.RCS1039.severity = none
# Remove enum default underlying type
dotnet_diagnostic.RCS1042.severity = warning
# Remove 'partial' modifier from type with a single part
dotnet_diagnostic.RCS1043.severity = warning
# Remove original exception from throw statement
# - Configured by C#
dotnet_diagnostic.RCS1044.severity = none
# Asynchronous method name should end with 'Async'
# - Configured by Coding Conventions
dotnet_diagnostic.RCS1046.severity = none
# Non-asynchronous method name should not end with 'Async'
dotnet_diagnostic.RCS1047.severity = warning
# Use lambda expression instead of anonymous method
dotnet_diagnostic.RCS1048.severity = error
# Simplify boolean comparison
dotnet_diagnostic.RCS1049.severity = warning
# Add argument list to object creation expression
dotnet_diagnostic.RCS1050.severity = warning
roslynator_object_creation_parentheses_style = include
# Parenthesize condition in conditional expression
# - Configured by Visual studio
dotnet_diagnostic.RCS1051.severity = none
# Declare each attribute separately
# - Configured by SA1133
dotnet_diagnostic.RCS1052.severity = none
# Avoid semicolon at the end of declaration
dotnet_diagnostic.RCS1055.severity = warning
# Avoid usage of using alias directive
dotnet_diagnostic.RCS1056.severity = warning
# Use compound assignment
# - Configured by Visual Studio
dotnet_diagnostic.RCS1058.severity = none
# Avoid locking on publicly accessible instance
dotnet_diagnostic.RCS1059.severity = error
# Declare each type in separate file
# - Configured by SA1402
dotnet_diagnostic.RCS1060.severity = none
# Merge if statement with nested if statement
dotnet_diagnostic.RCS1061.severity = warning
# Simplify logical negation
dotnet_diagnostic.RCS1068.severity = warning
# Remove unnecessary case label
dotnet_diagnostic.RCS1069.severity = warning
# Remove redundant default switch section
dotnet_diagnostic.RCS1070.severity = warning
# Remove redundant base constructor call
dotnet_diagnostic.RCS1071.severity = warning
# Convert 'if' to 'return' statement
# - Configured by Visual Studio
dotnet_diagnostic.RCS1073.severity = none
# Remove redundant constructor
dotnet_diagnostic.RCS1074.severity = warning
# Avoid empty catch clause that catches System.Exception
dotnet_diagnostic.RCS1075.severity = error
# Optimize LINQ method call
dotnet_diagnostic.RCS1077.severity = error
# Use "" instead of string.Empty
# - Configured by SA1122
dotnet_diagnostic.RCS1078.severity = none
# Throwing of new NotImplementedException
dotnet_diagnostic.RCS1079.severity = none
# Use 'Count/Length' property instead of 'Any' method
# Intentionally disabled by Roslynator
# - Configured by CA1829
dotnet_diagnostic.RCS1080.severity = none
# Split variable declaration
# - Configured by SA1132
dotnet_diagnostic.RCS1081.severity = none
# Use coalesce expression instead of conditional expression
# - Configured by Visual Studio
dotnet_diagnostic.RCS1084.severity = none
# Use auto-implemented property
# - Configured by Visual Studio
dotnet_diagnostic.RCS1085.severity = none
# Use --/++ operator instead of assignment
dotnet_diagnostic.RCS1089.severity = warning
# Call 'ConfigureAwait(false)'
# - Configured by CA2007
dotnet_diagnostic.RCS1090.severity = none
# Remove file with no code
dotnet_diagnostic.RCS1093.severity = warning
# Declare using directive on top level
# - Configured by SA1200
dotnet_diagnostic.RCS1094.severity = none
# Use 'HasFlag' method or bitwise operator
dotnet_diagnostic.RCS1096.severity = error
roslynator_enum_has_flag_style = operator
# Remove redundant 'ToString' call
dotnet_diagnostic.RCS1097.severity = warning
# Avoid 'null' on the left side of a binary expression
dotnet_diagnostic.RCS1098.severity = warning
# Default label should be the last label in a switch section
dotnet_diagnostic.RCS1099.severity = warning
# Make class static
# - Configured by C#
dotnet_diagnostic.RCS1102.severity = none
# Convert 'if' to assignment
dotnet_diagnostic.RCS1103.severity = warning
# Simplify conditional expression
dotnet_diagnostic.RCS1104.severity = warning
roslynator.RCS1104.suppress_when_condition_is_inverted = false
# Unncessary interpolation
dotnet_diagnostic.RCS1105.severity = warning
# Remove redundant 'ToCharArray' call
dotnet_diagnostic.RCS1107.severity = warning
# Add 'static' modifier to all partial class declarations
dotnet_diagnostic.RCS1108.severity = warning
# Declare type inside namespace
# - Configured by CA1050
dotnet_diagnostic.RCS1110.severity = none
# Add braces to switch section with multiple statements
dotnet_diagnostic.RCS1111.severity = warning
# Combine 'Enumerable.Where' method chain
dotnet_diagnostic.RCS1112.severity = warning
# Use 'string.IsNullOrEmpty' method
dotnet_diagnostic.RCS1113.severity = error
# Remove redundant delegate creation
dotnet_diagnostic.RCS1114.severity = warning
# Mark local variable as const
dotnet_diagnostic.RCS1118.severity = error
# Add parentheses according to operator precedence
# - Configured by Visual Studio
dotnet_diagnostic.RCS1123.severity = none
# Inline local variable
dotnet_diagnostic.RCS1124.severity = warning
# Add braces to if-else
# - Configured by Visual Studio
dotnet_diagnostic.RCS1126.severity = none
# Use coalesce expression
# - Configured by Visual Studio
dotnet_diagnostic.RCS1128.severity = none
# Remove redundant field initalization
dotnet_diagnostic.RCS1129.severity = warning
# Bitwise operation on enum without Flags attribute
dotnet_diagnostic.RCS1130.severity = error
# Remove redundant overriding member
dotnet_diagnostic.RCS1132.severity = warning
# Remove redundant Dispose/Close call
dotnet_diagnostic.RCS1133.severity = warning
# Remove redundant statement
dotnet_diagnostic.RCS1134.severity = warning
# Declare enum member with zero value (when enum has FlagsAttribute)
dotnet_diagnostic.RCS1135.severity = error
# Merge switch sections with equivalent content
dotnet_diagnostic.RCS1136.severity = warning
# Add summary to documentation comment
# - Configured by SA1604
dotnet_diagnostic.RCS1138.severity = none
# Add summary element to documentation comment
# - Configured by SA1604
dotnet_diagnostic.RCS1139.severity = none
# Add exception to documentation comment
dotnet_diagnostic.RCS1140.severity = warning
# Add 'param' element to documentation comment
# Configured by SA1611
dotnet_diagnostic.RCS1141.severity = none
# Add 'typeparam' element to documentation comment
# - Configured by SA1622
dotnet_diagnostic.RCS1142.severity = none
# Simplify coalesce expression
dotnet_diagnostic.RCS1143.severity = warning
# Remove redundant 'as' operator
dotnet_diagnostic.RCS1145.severity = warning
# Use conditional access
dotnet_diagnostic.RCS1146.severity = error
# Remove redundant cast
dotnet_diagnostic.RCS1151.severity = warning
# Sort enum members
dotnet_diagnostic.RCS1154.severity = warning
# Use StringComparison when comparing strings
dotnet_diagnostic.RCS1155.severity = error
# Use string.Length instead of comparison with empty string
# - Configured by CA1820
dotnet_diagnostic.RCS1156.severity = none
# Composite enum value contains undefined flag
dotnet_diagnostic.RCS1157.severity = error
# Static member in generic type should use a type parameter
# - Conflicts with CA1000
dotnet_diagnostic.RCS1158.severity = none
# Use EventHandler<T>
# - Configured by CA1003
dotnet_diagnostic.RCS1159.severity = none
# Abstract type should not have public constructors
# - Configured by CA1012
dotnet_diagnostic.RCS1160.severity = none
# Enum should declare explicit values
dotnet_diagnostic.RCS1161.severity = warning
# Avoid chain of assignments
dotnet_diagnostic.RCS1162.severity = warning
# Unused parameter
# - Configured by Visual Studio
dotnet_diagnostic.RCS1163.severity = none
# Unused type parameter
dotnet_diagnostic.RCS1164.severity = warning
# Unconstrained type parameter checked for null
dotnet_diagnostic.RCS1165.severity = error
# Value type object is never equal to null
dotnet_diagnostic.RCS1166.severity = error
# Parameter name differs from base name
dotnet_diagnostic.RCS1168.severity = warning
# Make field read-only
# - Configured by Visual Studio
dotnet_diagnostic.RCS1169.severity = none
# Use read-only auto-implemented property
dotnet_diagnostic.RCS1170.severity = error
# Simplify lazy initialization
dotnet_diagnostic.RCS1171.severity = warning
# Use 'is' operator instead of 'as' operator
dotnet_diagnostic.RCS1172.severity = warning
# Use coalesce expression instead of if
# - Configured by Visual Studio
dotnet_diagnostic.RCS1173.severity = none
# Remove redundant async/await
dotnet_diagnostic.RCS1174.severity = warning
# Unused this parameter
dotnet_diagnostic.RCS1175.severity = warning
# Use 'var' instead of explicit type (when the type is not obvious)
# - Configured by Visual Studio
dotnet_diagnostic.RCS1176.severity = none
# Use 'var' instead of explicit type (in foreach)
# - Configured by Visual Studio
dotnet_diagnostic.RCS1177.severity = none
# Use return instead of assignment
dotnet_diagnostic.RCS1179.severity = warning
# Inline lazy initialization
dotnet_diagnostic.RCS1180.severity = none
# Convert comment to documentation comment
dotnet_diagnostic.RCS1181.severity = warning
# Remove redundant base interface
dotnet_diagnostic.RCS1182.severity = warning
# Use Regex instance instead of static method
# - https://stackoverflow.com/questions/414328/using-static-regex-ismatch-vs-creating-an-instance-of-regex
dotnet_diagnostic.RCS1186.severity = none
# Use constant instead of field
# - Configured by CA1802
dotnet_diagnostic.RCS1187.severity = none
# Remove redundant auto-property initialization
dotnet_diagnostic.RCS1188.severity = warning
# Add or remove region name
# - Configured by SA1124
dotnet_diagnostic.RCS1189.severity = none
# Join string expressions
dotnet_diagnostic.RCS1190.severity = warning
# Declare enum value as combination of names
dotnet_diagnostic.RCS1191.severity = warning
# Use regular string literal instead of verbatim string literal
dotnet_diagnostic.RCS1192.severity = warning
# Overriding member cannot change 'params' modifier
dotnet_diagnostic.RCS1193.severity = error
# Implement exception constructors
# - Configured by CA1032
dotnet_diagnostic.RCS1194.severity = none
# Use ^ operator
dotnet_diagnostic.RCS1195.severity = warning
# Call extension method as instance method
dotnet_diagnostic.RCS1196.severity = warning
# Optimize StringBuilder.Append/AppendLine call
dotnet_diagnostic.RCS1197.severity = error
# Avoid unnecessary boxing of value type
# - https://davidzych.com/when-doing-string-concatenation-in-c-why-dont-you-have-to-call-tostring-on-non-string-variables/
# - Performance difference is negligible
dotnet_diagnostic.RCS1198.severity = silent
# Simplify boolean expression
dotnet_diagnostic.RCS1199.severity = warning
# Call 'Enumerable.ThenBy' instead of 'Enumerable.OrderBy'
dotnet_diagnostic.RCS1200.severity = error
# Use method chaining
dotnet_diagnostic.RCS1201.severity = warning
# Avoid NullReferenceException
dotnet_diagnostic.RCS1202.severity = error
# Use AttributeUsageAttribute
# - Configured by CA1018
dotnet_diagnostic.RCS1203.severity = none
# Use EventArgs.Empty
dotnet_diagnostic.RCS1204.severity = error
# Order named arguments according to the order of parameters
dotnet_diagnostic.RCS1205.severity = warning
# Use conditional access instead of conditional expression
dotnet_diagnostic.RCS1206.severity = error
# Use anonymous function or method group
dotnet_diagnostic.RCS1207.severity = warning
roslynator_use_anonymous_function_or_method_group = method_group
# Reduce if nesting
# - Conflicts with if statements in multiline lambda expressions
dotnet_diagnostic.RCS1208.severity = none
# Order type parameter constraints
dotnet_diagnostic.RCS1209.severity = warning
# Return Task.FromResult instead of returning null
dotnet_diagnostic.RCS1210.severity = error
# Remove unnecessary else clause
dotnet_diagnostic.RCS1211.severity = warning
# Remove redundant assignment
dotnet_diagnostic.RCS1212.severity = warning
# Remove unused member declaration
dotnet_diagnostic.RCS1213.severity = warning
# Unnecessary interpolated string
dotnet_diagnostic.RCS1214.severity = warning
# Expression is always equal to true/false
dotnet_diagnostic.RCS1215.severity = warning
# Unnecessary unsafe context
dotnet_diagnostic.RCS1216.severity = warning
# Convert interpolated string to concatenation
dotnet_diagnostic.RCS1217.severity = warning
# Simplify code branching
dotnet_diagnostic.RCS1218.severity = warning
# Use pattern matching instead of combination of 'is' operator and cast operator
dotnet_diagnostic.RCS1220.severity = error
# Use pattern matching instead of combination of 'as' operator and null check
dotnet_diagnostic.RCS1221.severity = error
# Merge preprocessor directives
dotnet_diagnostic.RCS1222.severity = warning
# Mark publicly visible type with DebuggerDisplay attribute
dotnet_diagnostic.RCS1223.severity = none
# Make method an extension method
dotnet_diagnostic.RCS1224.severity = error
# Make class sealed
dotnet_diagnostic.RCS1225.severity = error
# Add paragraph to documentation comment
dotnet_diagnostic.RCS1226.severity = warning
# Validate arguments correctly
# - Configured by CA1062
dotnet_diagnostic.RCS1227.severity = none
# Unused element in documentation comment
dotnet_diagnostic.RCS1228.severity = warning
# Use async/await when necessary
dotnet_diagnostic.RCS1229.severity = error
# Unnecessary usage of enumerator
dotnet_diagnostic.RCS1230.severity = warning
# Make parameter ref read-only
# - https://www.c-sharpcorner.com/article/c-sharp-7-2-in-parameter-and-performance/
dotnet_diagnostic.RCS1231.severity = error
# Order elements in documentation comment
dotnet_diagnostic.RCS1232.severity = warning
# Use short-circuiting operator
dotnet_diagnostic.RCS1233.severity = error
# Duplicate enum value
dotnet_diagnostic.RCS1234.severity = warning
# Optimize method call
dotnet_diagnostic.RCS1235.severity = error
# Use exception filter
dotnet_diagnostic.RCS1236.severity = error
# Avoid nested ?: operators
dotnet_diagnostic.RCS1238.severity = warning
# Use 'for' statement instead of 'while' statement
dotnet_diagnostic.RCS1239.severity = warning
# Operator is unnecessary
dotnet_diagnostic.RCS1240.severity = warning
# Implement non-generic counterpart
dotnet_diagnostic.RCS1241.severity = error
# Do not pass non-read-only struct by read-only reference
dotnet_diagnostic.RCS1242.severity = error
# Duplicate word in a comment
dotnet_diagnostic.RCS1243.severity = warning
# Simplify 'default' expression
dotnet_diagnostic.RCS1244.severity = warning
# Use element access
dotnet_diagnostic.RCS1246.severity = error
roslynator.RCS1246.suppress_when_expression_is_invocation = true
# Fix documentation comment tag
dotnet_diagnostic.RCS1247.severity = warning
# Use 'is null' pattern instead of comparison (or vice versa)
dotnet_diagnostic.RCS1248.severity = warning
roslynator_null_check_style = pattern_matching
# Unnecessary null-forgiving operator
dotnet_diagnostic.RCS1249.severity = warning
# Use implicit/explicit object creation
dotnet_diagnostic.RCS1250.severity = warning
roslynator_object_creation_type_style = implicit_when_type_is_obvious
roslynator_use_var_instead_of_implicit_object_creation = false
# Remove unnecessary braces from record declaration
dotnet_diagnostic.RCS1251.severity = warning
# Normalize usage of infinite loop
dotnet_diagnostic.RCS1252.severity = warning
roslynator_infinite_loop_style = while
# Format documentation comment summary
dotnet_diagnostic.RCS1253.severity = warning
roslynator_doc_comment_summary_style = multi_line
# Normalize format of enum flag value
dotnet_diagnostic.RCS1254.severity = warning
roslynator_enum_flag_value_style = decimal_number
# Simplify argument null check
dotnet_diagnostic.RCS1255.severity = warning
# Invalid argument null check
dotnet_diagnostic.RCS1256.severity = error
# Use enum field explicitly
dotnet_diagnostic.RCS1257.severity = error
# Unnecessary enum flag
dotnet_diagnostic.RCS1258.severity = warning
# Remove empty syntax
dotnet_diagnostic.RCS1259.severity = warning
# Add/remove trailing comma
dotnet_diagnostic.RCS1260.severity = warning
roslynator_trailing_comma_style = omit_when_single_line
###########################################################################################################################################
# Roslynator Code Analysis #
# https://github.com/JosefPihrt/Roslynator/blob/master/src/CodeAnalysis.Analyzers/README.md #
###########################################################################################################################################
# Use pattern matching
dotnet_diagnostic.RCS9001.severity = error
# Use property SyntaxNode.SpanStart
dotnet_diagnostic.RCS9002.severity = error
# Unnecessary conditional access
dotnet_diagnostic.RCS9003.severity = error
# Call 'Any' instead of accessing 'Count'
dotnet_diagnostic.RCS9004.severity = error
# Unnecessary null check
dotnet_diagnostic.RCS9005.severity = error
# Use element access
dotnet_diagnostic.RCS9006.severity = error
# Use return value
dotnet_diagnostic.RCS9007.severity = none
# Call 'Last' instead of using []
dotnet_diagnostic.RCS9008.severity = error
# Unknown language name
dotnet_diagnostic.RCS9009.severity = error
# Specify ExportCodeRefactoringProviderAttribute.Name
dotnet_diagnostic.RCS9010.severity = error
# Specify ExportCodeFixProviderAttribute.Name
dotnet_diagnostic.RCS9011.severity = error
###########################################################################################################################################
# Roslynator Formatting #
# https://github.com/JosefPihrt/Roslynator/blob/master/src/Formatting.Analyzers/README.md #
###########################################################################################################################################
# Add empty line after embedded statement
# - Conflicts with Visual Studio preferences (always use braces)
dotnet_diagnostic.RCS0001.severity = none
# Add empty line after #region
dotnet_diagnostic.RCS0002.severity = none
# Add empty line after using directive list
# - Configured by SA1513
dotnet_diagnostic.RCS0003.severity = none
# Add empty line after #region
dotnet_diagnostic.RCS0005.severity = none
# Add empty line before using directive list
dotnet_diagnostic.RCS0006.severity = none
# Add empty line between accessors
# - Configured by SA1513
dotnet_diagnostic.RCS0007.severity = none
# Add empty line between block and statement
# - Configured by SA1513
dotnet_diagnostic.RCS0008.severity = none
# Add empty line between declaration and documentation comment
# - Configured by SA1516
dotnet_diagnostic.RCS0009.severity = none
# Add empty line between declarations
# - Configured by SA1516
dotnet_diagnostic.RCS0010.severity = none
# Add/remove blank line between single-line accessors
dotnet_diagnostic.RCS0011.severity = warning
roslynator_blank_line_between_single_line_accessors = false
# Add empty line between single-line declarations
# - Configured by SA1513
dotnet_diagnostic.RCS0012.severity = none
# Add empty line between single-line declarations of different kind
# - Configured by SA1513
dotnet_diagnostic.RCS0013.severity = none
# Add empty line between switch sections
dotnet_diagnostic.RCS0014.severity = none
# Add/remove blank line between using directives
dotnet_diagnostic.RCS0015.severity = warning
roslynator_blank_line_between_using_directives = never
# Add newline after attribute list
dotnet_diagnostic.RCS0016.severity = warning
# Add newline after opening brace of accessor
dotnet_diagnostic.RCS0020.severity = none
# Format single-line block
# - Configured by SA1502
dotnet_diagnostic.RCS0021.severity = none
# Format declaration braces
# - Configured by SA1502
dotnet_diagnostic.RCS0023.severity = none
# Add new line after switch label
dotnet_diagnostic.RCS0024.severity = warning
# Add newline before accessor of full property
# - Configured by SA1502
dotnet_diagnostic.RCS0025.severity = none
# Add newline before binary operator instead of after it
dotnet_diagnostic.RCS0027.severity = none
# Place new line after/before '?:' operator
dotnet_diagnostic.RCS0028.severity = warning
roslynator_conditional_operator_new_line = before
# Add newline before constructor initializer
dotnet_diagnostic.RCS0029.severity = none
# Add new line before embedded statement
# - Configured by Visual Studio
dotnet_diagnostic.RCS0030.severity = none
# Add new line before enum member
# - Configured by SA1136
dotnet_diagnostic.RCS0031.severity = none
# Add newline before expression-body arrow instead of after it (or vice versa)
dotnet_diagnostic.RCS0032.severity = none
# Add new line before statement
# - Configured by SA1502
dotnet_diagnostic.RCS0033.severity = none
# Add newline before type parameter constraint
dotnet_diagnostic.RCS0034.severity = none
# Remove empty line between single-line declarations of same kind
dotnet_diagnostic.RCS0036.severity = none
# Remove empty line between using directives with same root namespace
dotnet_diagnostic.RCS0038.severity = warning
# Remove newline between 'if' keyword and 'else' keyword
dotnet_diagnostic.RCS0039.severity = none
# Remove newline before base list
dotnet_diagnostic.RCS0041.severity = none
# Remove newlines from accessor list of auto-property
# - Configured by SA1502
dotnet_diagnostic.RCS0042.severity = none
# Use carriage return + linefeed as newline
# - Configured by Visual Studio
dotnet_diagnostic.RCS0044.severity = none
# Use linefeed as newline
# - Configured by Visual Studio
dotnet_diagnostic.RCS0045.severity = none
# Use space(s) instead of tab
# - Configured by Visual Studio
dotnet_diagnostic.RCS0046.severity = none
# Remove newlines from initializer with single-line expression
dotnet_diagnostic.RCS0048.severity = warning
# Add empty line after top comment
dotnet_diagnostic.RCS0049.severity = warning
# Add empty line before top declaration
# - Configured by SA1516
dotnet_diagnostic.RCS0050.severity = none
# Add newline between closing brace and 'while' keyword (or vice versa)
# - Configured by SA1500
dotnet_diagnostic.RCS0051.severity = none
# Place new line after/before equals token
dotnet_diagnostic.RCS0052.severity = warning
roslynator_equals_token_new_line = after
# Fix formatting of a list
# - Configured by Visual Studio and StyleCop
dotnet_diagnostic.RCS0053.severity = none
# Fix formatting of a call chain
dotnet_diagnostic.RCS0054.severity = warning
# Fix formatting of a binary expression chain
dotnet_diagnostic.RCS0055.severity = warning
# A line is too long
dotnet_diagnostic.RCS0056.severity = warning
roslynator_max_line_length = 140
# Normalize whitespace at the beginning of a file
dotnet_diagnostic.RCS0057.severity = warning
# Normalize whitespace at the end of a file
# - Configured by Visual Studio
dotnet_diagnostic.RCS0058.severity = none
# Place new line after/before null-conditional operator
dotnet_diagnostic.RCS0059.severity = warning
roslynator_null_conditional_operator_new_line = before
# Add/remove line after file scoped namespace declaration
dotnet_diagnostic.RCS0060.severity = warning
roslynator_blank_line_after_file_scoped_namespace_declaration = true