root = true [*] tab_width = 4 indent_size = 4 indent_style = space end_of_line = crlf charset = utf-8 [*.{cshtml,csproj,html,json,props,razor,wixproj,wxl,wxs,xaml,xml,yaml}] tab_width = 2 indent_size = 2 [*.cs] csharp_preferred_modifier_order = public, private, protected, internal, file, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, required, volatile, async csharp_style_namespace_declarations = file_scoped csharp_style_prefer_primary_constructors = false csharp_style_var_for_built_in_types = true csharp_style_var_when_type_is_apparent = true csharp_style_var_elsewhere = true dotnet_style_prefer_collection_expression = false dotnet_style_prefer_inferred_anonymous_type_member_names = false dotnet_style_prefer_inferred_tuple_names = false csharp_using_directive_placement = inside_namespace # Add missing cases to switch statement (IDE0010) # Increases maintainability, does not account for proper use of default value dotnet_diagnostic.IDE0010.severity = none # Use conditional expression for assignment (IDE0045) # Preference should not be applied in all use cases # The number of exceptions justifies global suppression #dotnet_style_prefer_conditional_expression_over_assignment = true dotnet_diagnostic.IDE0045.severity = none # Use conditional expression for return (IDE0046) # Preference should not be applied in all use cases # The number of exceptions justifies global suppression #dotnet_style_prefer_conditional_expression_over_return = true dotnet_diagnostic.IDE0046.severity = none # Formatting rule (IDE0055) # Formatting is enforced by StyleCop dotnet_diagnostic.IDE0055.severity = none # Remove unnecessary expression value (IDE0058) # Preference does not account for fluent interface, method chaining and .NET types that return values that can be safely ignored. #csharp_style_unused_value_expression_statement_preference = discard_variable dotnet_diagnostic.IDE0058.severity = none # Add missing cases to switch expression (IDE0072) # Increases maintainability, does not account for proper use of default value dotnet_diagnostic.IDE0072.severity = none [*.cshtml.cs] # SA1649FileNameMustMatchTypeName # Razor Pages use a convention that violates this rule dotnet_diagnostic.SA1649.severity = none