Resharper falsely claims setting is overridden by editorconfig

I'm trying to have resharper format single-line expression braces as so:

// Resharper is formatting like this
int[] x = {1, 2, 3};
// I'd like it to format like this
int[] x = { 1, 2, 3 };

I have the option set in Resharper settings, however Resharper claims the option is being overridden by editorconfig.

However this option is not present in my editorconfig. If I _add_ the setting to my editorconfig it will be respected, but removing it results in the screenshot above. 

It appears as though Resharper is reading this missing value in the editorconfig as “false” instead of “null” (or missing).

Please can you let me know how to make Resharper respect my preference here. I'd reather not have to add this line to the editorconfig of every single project I work on!

1
6 comments

Hello Duncan Blair, thank you for your question. Let's check, maybe there is some other .editorconfig file that contains this setting. Please try clicking on the "Edit" button at the top right in the Options dialog. After this, a window will open with the ability to edit the .editorconfig file, and the path to this file will be shown at the top. Is this file the same one you checked before?

0

I have the same problem in the newest version.
Desired format:

Resharper does this:

Resharper Options:

After clicking on Edit at the top right:

After changing this to false and clicking on Save:

It seems like Resharper is assuming default values if they are not present in the .editorconfig. In my opinion, values not present in .editorconfig should be overridable by the solution / personal or this computer options. However, I can add this setting with a value of true to solution / personal or this computer and it still enforces the value false because it thinks that's how it is defined in .editorconfig.

If this is intended behavior it should at least mark the setting as overridden by .editorconfig in the options dialog like for the settings that are present in .editorconfig. Thanks :)

0

Hello Michael Zehr,

Sorry for being late in this thread. Could you please share your initial .editorconfig before you've edited it with ReSharper UI?

Thank you.

0

Sure. In previous Resharper versions I was able to edit the formatting rules in the options and save them to “this computer” to overwrite the settings. Now changes in the options that are saved to “this computer” no longer take effect. If I apply the changes to the .editorconfig then it works.

# Rules in this file were initially inferred by Visual Studio IntelliCode from the D:\Prg\TFS_MAZ\Projects\Work codebase based on best match to current usage at 14.08.2018
# You can modify the rules from these initially generated values to suit your own policies
# You can learn more about editorconfig here: https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference

# top-most EditorConfig file
root = true

[*.cs]

# options_name = false|true : none|silent|suggestion|warning|error

#### Core EditorConfig Options ####

# Indentation and spacing
indent_size = 2
indent_style = space
tab_width = 2

# New line preferences
end_of_line = crlf
insert_final_newline = true

#### .NET Coding Conventions ####

# Organize usings
dotnet_separate_import_directive_groups = false
dotnet_sort_system_directives_first = true
file_header_template = unset

# this. and Me. preferences
dotnet_style_qualification_for_event = false:error
dotnet_style_qualification_for_field = true:error
dotnet_style_qualification_for_method = false:error
dotnet_style_qualification_for_property = false:error

# Language keywords vs BCL types preferences
dotnet_style_predefined_type_for_locals_parameters_members = true:error
dotnet_style_predefined_type_for_member_access = true:error

# Parentheses preferences
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion

# Modifier preferences
dotnet_style_require_accessibility_modifiers = for_non_interface_members:error

# Expression-level preferences
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_explicit_tuple_names = true:error
dotnet_style_namespace_match_folder = true
dotnet_style_null_propagation = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_compound_assignment = true
dotnet_style_prefer_conditional_expression_over_assignment = true
dotnet_style_prefer_conditional_expression_over_return = true
dotnet_style_prefer_inferred_anonymous_type_member_names = false:none
dotnet_style_prefer_inferred_tuple_names = false:error
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true
dotnet_style_prefer_simplified_interpolation = true

# Field preferences
dotnet_style_readonly_field = true:suggestion

# Parameter preferences
dotnet_code_quality_unused_parameters = all

# Suppression preferences
dotnet_remove_unnecessary_suppression_exclusions = none

# New line preferences
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
dotnet_style_allow_statement_immediately_after_block_experimental = false:warning

#### C# Coding Conventions ####

# var preferences
csharp_style_var_elsewhere = false:error
csharp_style_var_for_built_in_types = false:error
csharp_style_var_when_type_is_apparent = false:error

# Expression-bodied members
csharp_style_expression_bodied_accessors = false:none
csharp_style_expression_bodied_constructors = false:error
csharp_style_expression_bodied_indexers = false:none
csharp_style_expression_bodied_lambdas = false:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_expression_bodied_methods = false:error
csharp_style_expression_bodied_operators = false:error
csharp_style_expression_bodied_properties = false:none

# Pattern matching preferences
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_prefer_not_pattern = true:suggestion
csharp_style_prefer_pattern_matching = true:silent
csharp_style_prefer_switch_expression = false:silent

# Null-checking preferences
csharp_style_conditional_delegate_call = true:suggestion

# Modifier preferences
csharp_prefer_static_local_function = true:suggestion
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async

# Code-block preferences
csharp_prefer_braces = true:error
csharp_prefer_simple_using_statement = true:suggestion
csharp_style_namespace_declarations = block_scoped:suggestion

# Expression-level preferences
csharp_prefer_simple_default_expression = false:suggestion
csharp_style_deconstructed_variable_declaration = false:error
csharp_style_implicit_object_creation_when_type_is_apparent = false:warning
csharp_style_inlined_variable_declaration = true:suggestion
csharp_style_pattern_local_over_anonymous_function = true
csharp_style_prefer_index_operator = false:silent
csharp_style_prefer_null_check_over_type_check = true:suggestion
csharp_style_prefer_range_operator = false:silent
csharp_style_throw_expression = false:silent
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
csharp_style_unused_value_expression_statement_preference = discard_variable:silent

# 'using' directive preferences
csharp_using_directive_placement = outside_namespace:warning

# New line preferences
csharp_style_allow_blank_line_after_colon_in_constructor_initializer_experimental = false:silent
csharp_style_allow_blank_lines_between_consecutive_braces_experimental = false:warning
csharp_style_allow_embedded_statements_on_same_line_experimental = false:error

#### C# Formatting Rules ####

# New line preferences
csharp_new_line_before_catch = true
csharp_new_line_before_else = true
csharp_new_line_before_finally = true
csharp_new_line_before_members_in_anonymous_types = true
csharp_new_line_before_members_in_object_initializers = true
csharp_new_line_before_open_brace = all
csharp_new_line_between_query_expression_clauses = true

# Indentation preferences
csharp_indent_block_contents = true
csharp_indent_braces = false
csharp_indent_case_contents = true
csharp_indent_case_contents_when_block = false
csharp_indent_labels = flush_left
csharp_indent_switch_labels = true

# Space preferences
csharp_space_after_cast = false
csharp_space_after_colon_in_inheritance_clause = true
csharp_space_after_comma = true
csharp_space_after_dot = false
csharp_space_after_keywords_in_control_flow_statements = true
csharp_space_after_semicolon_in_for_statement = true
csharp_space_around_binary_operators = before_and_after
csharp_space_around_declaration_statements = false
csharp_space_before_colon_in_inheritance_clause = true
csharp_space_before_comma = false
csharp_space_before_dot = false
csharp_space_before_open_square_brackets = false
csharp_space_before_semicolon_in_for_statement = false
csharp_space_between_empty_square_brackets = false
csharp_space_between_method_call_empty_parameter_list_parentheses = false
csharp_space_between_method_call_name_and_opening_parenthesis = false
csharp_space_between_method_call_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_declaration_parameter_list_parentheses = false
csharp_space_between_parentheses = false
csharp_space_between_square_brackets = false

# Wrapping preferences
csharp_preserve_single_line_blocks = true
csharp_preserve_single_line_statements = false

#### Naming styles ####

# Naming rules

dotnet_naming_rule.interface_should_be_begins_with_i.severity = error
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i

dotnet_naming_rule.types_should_be_pascal_case.severity = error
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case

dotnet_naming_rule.non_field_members_should_be_pascal_case.severity = error
dotnet_naming_rule.non_field_members_should_be_pascal_case.symbols = non_field_members
dotnet_naming_rule.non_field_members_should_be_pascal_case.style = pascal_case

# Symbol specifications

dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_symbols.interface.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.interface.required_modifiers =

dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum
dotnet_naming_symbols.types.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.types.required_modifiers =

dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
dotnet_naming_symbols.non_field_members.required_modifiers =

# Naming styles

dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case

dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case

#Naming

dotnet_naming_symbols.upper_case_symbols.applicable_kinds = property,method,event,delegate

dotnet_naming_rule.public_members_must_be_capitalized.symbols = const_fields
dotnet_naming_rule.public_members_must_be_capitalized.style = first_word_upper_case_style
dotnet_naming_rule.public_members_must_be_capitalized.severity = error

dotnet_naming_symbols.const_fields.applicable_kinds = field
dotnet_naming_symbols.const_fields.required_modifiers = const

dotnet_naming_style.first_word_upper_case_style.capitalization = first_word_upper


# FxCop analyzer rules
# https://docs.microsoft.com/en-us/visualstudio/code-quality/use-roslyn-analyzers?view=vs-2019#set-rule-severity-in-an-editorconfig-file
# https://github.com/dotnet/roslyn-analyzers/blob/master/src/Microsoft.CodeAnalysis.FxCopAnalyzers/Microsoft.CodeAnalysis.FxCopAnalyzers.md
# check performance: msbuild Projects.sln -t:Rebuild -p:ReportAnalyzer=true;Configuration=Debug -v:n -fl

#error
dotnet_diagnostic.CA1001.severity = suggestion
dotnet_diagnostic.CA1005.severity = suggestion
dotnet_diagnostic.CA1008.severity = suggestion
dotnet_diagnostic.CA1009.severity = error
dotnet_diagnostic.CA1012.severity = suggestion
dotnet_diagnostic.CA1016.severity = error
dotnet_diagnostic.CA1033.severity = none
dotnet_diagnostic.CA1049.severity = error
dotnet_diagnostic.CA1060.severity = suggestion
dotnet_diagnostic.CA1061.severity = suggestion
# suggestion (but too slow) Validate arguments of public methods
dotnet_diagnostic.CA1062.severity = none
dotnet_diagnostic.CA1063.severity = suggestion
dotnet_diagnostic.CA1065.severity = suggestion
dotnet_diagnostic.CA1301.severity = error
dotnet_diagnostic.CA1311.severity = suggestion
dotnet_diagnostic.CA1400.severity = error
dotnet_diagnostic.CA1401.severity = suggestion
dotnet_diagnostic.CA1403.severity = error
dotnet_diagnostic.CA1404.severity = error
dotnet_diagnostic.CA1405.severity = error
dotnet_diagnostic.CA1410.severity = error
dotnet_diagnostic.CA1415.severity = error
dotnet_diagnostic.CA1501.severity = suggestion
dotnet_diagnostic.CA1505.severity = suggestion
dotnet_diagnostic.CA1821.severity = error
dotnet_diagnostic.CA1824.severity = suggestion
dotnet_diagnostic.CA1900.severity = error
dotnet_diagnostic.CA1901.severity = error
dotnet_diagnostic.CA2002.severity = suggestion
dotnet_diagnostic.CA2007.severity = suggestion
dotnet_diagnostic.CA2100.severity = suggestion
dotnet_diagnostic.CA2101.severity = suggestion
dotnet_diagnostic.CA2108.severity = error
dotnet_diagnostic.CA2111.severity = error
dotnet_diagnostic.CA2112.severity = error
dotnet_diagnostic.CA2114.severity = error
dotnet_diagnostic.CA2116.severity = error
dotnet_diagnostic.CA2117.severity = error
dotnet_diagnostic.CA2122.severity = error
dotnet_diagnostic.CA2123.severity = error
dotnet_diagnostic.CA2124.severity = error
dotnet_diagnostic.CA2126.severity = error
dotnet_diagnostic.CA2131.severity = error
dotnet_diagnostic.CA2132.severity = error
dotnet_diagnostic.CA2133.severity = error
dotnet_diagnostic.CA2134.severity = error
dotnet_diagnostic.CA2137.severity = error
dotnet_diagnostic.CA2138.severity = error
dotnet_diagnostic.CA2140.severity = error
dotnet_diagnostic.CA2141.severity = error
dotnet_diagnostic.CA2146.severity = error
dotnet_diagnostic.CA2147.severity = error
dotnet_diagnostic.CA2149.severity = error
dotnet_diagnostic.CA2200.severity = error
dotnet_diagnostic.CA2202.severity = error
dotnet_diagnostic.CA2207.severity = error
dotnet_diagnostic.CA2212.severity = error
dotnet_diagnostic.CA2213.severity = suggestion
dotnet_diagnostic.CA2214.severity = suggestion
dotnet_diagnostic.CA2216.severity = error
dotnet_diagnostic.CA2220.severity = error
dotnet_diagnostic.CA2229.severity = suggestion
dotnet_diagnostic.CA2231.severity = suggestion
dotnet_diagnostic.CA2232.severity = error
dotnet_diagnostic.CA2235.severity = suggestion
dotnet_diagnostic.CA2236.severity = error
dotnet_diagnostic.CA2237.severity = suggestion
dotnet_diagnostic.CA2238.severity = error
dotnet_diagnostic.CA2240.severity = error
dotnet_diagnostic.CA2241.severity = suggestion
dotnet_diagnostic.CA2242.severity = error
dotnet_diagnostic.CA3075.severity = none
dotnet_diagnostic.SA0001.severity = none
dotnet_diagnostic.SA1005.severity = none
dotnet_diagnostic.SA1011.severity = none
dotnet_diagnostic.SA1025.severity = none
dotnet_diagnostic.SA1028.severity = none
dotnet_diagnostic.SA1100.severity = suggestion
dotnet_diagnostic.SA1101.severity = none
dotnet_diagnostic.SA1102.severity = suggestion
dotnet_diagnostic.SA1115.severity = suggestion
dotnet_diagnostic.SA1116.severity = none
dotnet_diagnostic.SA1118.severity = none
dotnet_diagnostic.SA1119.severity = suggestion
dotnet_diagnostic.SA1120.severity = suggestion
dotnet_diagnostic.SA1124.severity = suggestion
dotnet_diagnostic.SA1127.severity = suggestion
dotnet_diagnostic.SA1129.severity = suggestion
dotnet_diagnostic.SA1130.severity = suggestion
dotnet_diagnostic.SA1131.severity = suggestion
dotnet_diagnostic.SA1133.severity = suggestion
dotnet_diagnostic.SA1137.severity = suggestion
dotnet_diagnostic.SA1200.severity = suggestion
dotnet_diagnostic.SA1201.severity = suggestion
dotnet_diagnostic.SA1202.severity = none
dotnet_diagnostic.SA1203.severity = suggestion
dotnet_diagnostic.SA1204.severity = suggestion
dotnet_diagnostic.SA1210.severity = suggestion
dotnet_diagnostic.SA1305.severity = warning
dotnet_diagnostic.SA1311.severity = suggestion
dotnet_diagnostic.SA1314.severity = suggestion
dotnet_diagnostic.SA1401.severity = warning
dotnet_diagnostic.SA1402.severity = suggestion
dotnet_diagnostic.SA1411.severity = suggestion
dotnet_diagnostic.SA1413.severity = suggestion
dotnet_diagnostic.SA1502.severity = suggestion
dotnet_diagnostic.SA1513.severity = suggestion
dotnet_diagnostic.SA1516.severity = none
dotnet_diagnostic.SA1517.severity = suggestion
dotnet_diagnostic.SA1600.severity = none
dotnet_diagnostic.SA1601.severity = none
dotnet_diagnostic.SA1602.severity = none
dotnet_diagnostic.SA1604.severity = none
dotnet_diagnostic.SA1605.severity = none
dotnet_diagnostic.SA1606.severity = none
dotnet_diagnostic.SA1607.severity = none
dotnet_diagnostic.SA1608.severity = none
dotnet_diagnostic.SA1610.severity = none
dotnet_diagnostic.SA1611.severity = none
dotnet_diagnostic.SA1612.severity = none
dotnet_diagnostic.SA1613.severity = none
dotnet_diagnostic.SA1614.severity = none
dotnet_diagnostic.SA1615.severity = none
dotnet_diagnostic.SA1616.severity = none
dotnet_diagnostic.SA1617.severity = none
dotnet_diagnostic.SA1618.severity = none
dotnet_diagnostic.SA1619.severity = none
dotnet_diagnostic.SA1620.severity = none
dotnet_diagnostic.SA1621.severity = none
dotnet_diagnostic.SA1622.severity = none
dotnet_diagnostic.SA1623.severity = none
dotnet_diagnostic.SA1624.severity = none
dotnet_diagnostic.SA1625.severity = none
dotnet_diagnostic.SA1626.severity = none
dotnet_diagnostic.SA1627.severity = none
dotnet_diagnostic.SA1629.severity = none
dotnet_diagnostic.SA1633.severity = none
dotnet_diagnostic.SA1634.severity = none
dotnet_diagnostic.SA1635.severity = none
dotnet_diagnostic.SA1636.severity = none
dotnet_diagnostic.SA1637.severity = none
dotnet_diagnostic.SA1638.severity = none
dotnet_diagnostic.SA1640.severity = none
dotnet_diagnostic.SA1641.severity = none
dotnet_diagnostic.SA1642.severity = none
dotnet_diagnostic.SA1643.severity = none
dotnet_diagnostic.SA1648.severity = none
dotnet_diagnostic.SA1649.severity = suggestion
dotnet_diagnostic.IL3000.severity = none
dotnet_diagnostic.IL3001.severity = none
dotnet_analyzer_diagnostic.category-design.severity = none
dotnet_analyzer_diagnostic.category-documentation.severity = none
dotnet_analyzer_diagnostic.category-globalization.severity = none
dotnet_analyzer_diagnostic.category-interoperability.severity = none
dotnet_analyzer_diagnostic.category-maintainability.severity = none
dotnet_analyzer_diagnostic.category-naming.severity = none
dotnet_analyzer_diagnostic.category-performance.severity = none
dotnet_analyzer_diagnostic.category-publish.severity = none
dotnet_analyzer_diagnostic.category-reliability.severity = none
dotnet_analyzer_diagnostic.category-security.severity = none
dotnet_analyzer_diagnostic.category-usage.severity = none
dotnet_analyzer_diagnostic.severity = default

# VS2022 C# 8 nullable
dotnet_diagnostic.CS8600.severity = error
dotnet_diagnostic.CS8601.severity = error
dotnet_diagnostic.CS8602.severity = error
dotnet_diagnostic.CS8603.severity = error
dotnet_diagnostic.CS8604.severity = error
dotnet_diagnostic.CS8605.severity = error
dotnet_diagnostic.CS8606.severity = error
dotnet_diagnostic.CS8607.severity = error
dotnet_diagnostic.CS8608.severity = error
dotnet_diagnostic.CS8609.severity = error
dotnet_diagnostic.CS8610.severity = error
dotnet_diagnostic.CS8611.severity = error
dotnet_diagnostic.CS8612.severity = error
dotnet_diagnostic.CS8613.severity = error
dotnet_diagnostic.CS8614.severity = error
dotnet_diagnostic.CS8615.severity = error
dotnet_diagnostic.CS8616.severity = error
dotnet_diagnostic.CS8617.severity = error
dotnet_diagnostic.CS8618.severity = error
dotnet_diagnostic.CS8619.severity = error
dotnet_diagnostic.CS8620.severity = error
dotnet_diagnostic.CS8621.severity = error
dotnet_diagnostic.CS8622.severity = error
dotnet_diagnostic.CS8623.severity = error
dotnet_diagnostic.CS8624.severity = error
dotnet_diagnostic.CS8625.severity = error
dotnet_diagnostic.CS8626.severity = error
dotnet_diagnostic.CS8629.severity = error
dotnet_diagnostic.CS8631.severity = error
dotnet_diagnostic.CS8632.severity = error
dotnet_diagnostic.CS8633.severity = error
dotnet_diagnostic.CS8634.severity = error
dotnet_diagnostic.CS8638.severity = error
dotnet_diagnostic.CS8643.severity = error
dotnet_diagnostic.CS8644.severity = error
dotnet_diagnostic.CS8645.severity = error
dotnet_diagnostic.CS8653.severity = error
dotnet_diagnostic.CS8654.severity = error
dotnet_diagnostic.CS8655.severity = error
dotnet_diagnostic.CS8667.severity = error
dotnet_diagnostic.CS8714.severity = error
dotnet_diagnostic.CS8766.severity = error

# NetAnalyzer mit AnalysisMode "AllEnabledByDefault"
dotnet_diagnostic.CA1000.severity = none
dotnet_diagnostic.CA1002.severity = suggestion
dotnet_diagnostic.CA1014.severity = none
dotnet_diagnostic.CA1019.severity = none
dotnet_diagnostic.CA1024.severity = none
dotnet_diagnostic.CA1028.severity = none
dotnet_diagnostic.CA1031.severity = suggestion
dotnet_diagnostic.CA1032.severity = none
dotnet_diagnostic.CA1034.severity = suggestion
dotnet_diagnostic.CA1036.severity = suggestion
dotnet_diagnostic.CA1040.severity = suggestion
dotnet_diagnostic.CA1044.severity = suggestion
dotnet_diagnostic.CA1054.severity = none
dotnet_diagnostic.CA1055.severity = none
dotnet_diagnostic.CA1056.severity = none
dotnet_diagnostic.CA1304.severity = suggestion
dotnet_diagnostic.CA1305.severity = suggestion
dotnet_diagnostic.CA1307.severity = suggestion
dotnet_diagnostic.CA1308.severity = suggestion
dotnet_diagnostic.CA1309.severity = suggestion
dotnet_diagnostic.CA1310.severity = suggestion
dotnet_diagnostic.CA1707.severity = suggestion
dotnet_diagnostic.CA1710.severity = suggestion
dotnet_diagnostic.CA1716.severity = none
dotnet_diagnostic.CA1720.severity = none
dotnet_diagnostic.CA1721.severity = suggestion
dotnet_diagnostic.CA1724.severity = suggestion
dotnet_diagnostic.CA1725.severity = none
dotnet_diagnostic.CA1805.severity = warning
dotnet_diagnostic.CA1806.severity = none
dotnet_diagnostic.CA1812.severity = none
dotnet_diagnostic.CA1813.severity = warning
dotnet_diagnostic.CA1815.severity = suggestion
dotnet_diagnostic.CA1819.severity = none
dotnet_diagnostic.CA1820.severity = warning
dotnet_diagnostic.CA1822.severity = suggestion
dotnet_diagnostic.CA1825.severity = suggestion
dotnet_diagnostic.CA1841.severity = warning
dotnet_diagnostic.CA1848.severity = none
dotnet_diagnostic.CA2201.severity = none
dotnet_diagnostic.CA2208.severity = none
dotnet_diagnostic.CA2225.severity = suggestion
dotnet_diagnostic.CA2227.severity = suggestion
dotnet_diagnostic.CA2234.severity = suggestion
dotnet_diagnostic.CA2254.severity = none
dotnet_diagnostic.CA5364.severity = none
dotnet_diagnostic.CA5369.severity = none
dotnet_diagnostic.CA5371.severity = none
dotnet_diagnostic.CA5379.severity = none
dotnet_diagnostic.CA5386.severity = none
dotnet_diagnostic.CA5394.severity = none
dotnet_diagnostic.CA5395.severity = none

# NetAnalyzer mit AnalysisMode "AllEnabledByDefault" -> TODO: warning
# Warnungen: CA1052=~1100; CA1507=~1200; CA1508=~300; CA1711=~80; CA1823=~60; CA2000=~3000; CA1810=~20;
dotnet_diagnostic.CA1052.severity = suggestion
dotnet_diagnostic.CA1507.severity = suggestion
dotnet_diagnostic.CA1508.severity = suggestion
dotnet_diagnostic.CA1711.severity = suggestion
dotnet_diagnostic.CA1823.severity = suggestion
dotnet_diagnostic.CA1829.severity = suggestion
dotnet_diagnostic.CA2000.severity = suggestion
dotnet_diagnostic.CA1810.severity = suggestion

dotnet_diagnostic.CA1852.severity = suggestion
dotnet_diagnostic.CA1854.severity = suggestion
dotnet_diagnostic.CA1859.severity = suggestion
dotnet_diagnostic.CA1860.severity = suggestion
dotnet_diagnostic.CA1862.severity = suggestion
dotnet_diagnostic.CA1868.severity = suggestion

# MZE: Mobile
dotnet_diagnostic.CA1003.severity = none
dotnet_diagnostic.CA1027.severity = none
dotnet_diagnostic.CA1030.severity = none
dotnet_diagnostic.CA2109.severity = none

# Ignore PdfSharp
[**/PdfSharp/**]
dotnet_style_qualification_for_field = true:none
dotnet_style_qualification_for_method = false:none
dotnet_style_qualification_for_property = false:none
dotnet_style_qualification_for_event = false:none
dotnet_style_predefined_type_for_locals_parameters_members = true:none
dotnet_style_predefined_type_for_member_access = true:none
dotnet_style_require_accessibility_modifiers = for_non_interface_members:none
csharp_preferred_modifier_order = public, private, protected, internal, static, extern, new, virtual, abstract, sealed, override, readonly, unsafe, volatile, async:none
dotnet_style_readonly_field = true:none
dotnet_style_object_initializer = true:none
dotnet_style_collection_initializer = true:none
dotnet_style_explicit_tuple_names = true:none
dotnet_style_prefer_inferred_tuple_names = false:none
dotnet_style_prefer_inferred_anonymous_type_member_names = false:none
dotnet_style_prefer_auto_properties = true:none
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:none
dotnet_style_coalesce_expression = true:none
dotnet_style_null_propagation = true:none
csharp_style_var_for_built_in_types = false:error
csharp_style_var_when_type_is_apparent = false:error
csharp_style_var_elsewhere = false:error
csharp_style_expression_bodied_methods = false:error
csharp_style_expression_bodied_constructors = false:error
csharp_style_expression_bodied_operators = false:error
csharp_style_expression_bodied_properties = false:none
csharp_style_expression_bodied_indexers = false:none
csharp_style_expression_bodied_accessors = false:none
csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
csharp_style_pattern_matching_over_as_with_null_check = true:suggestion
csharp_style_inlined_variable_declaration = true:suggestion
csharp_prefer_simple_default_expression = false:suggestion
csharp_style_deconstructed_variable_declaration = false:error
csharp_style_pattern_local_over_anonymous_function = false:none
csharp_style_throw_expression = false:silent
csharp_style_conditional_delegate_call = true:suggestion
csharp_prefer_braces = true:error

dotnet_naming_rule.public_members_must_be_capitalized.severity = none
dotnet_naming_rule.public_members_must_be_capitalized.severity = none
csharp_style_prefer_local_over_anonymous_function = true:suggestion
csharp_style_prefer_tuple_swap = true:suggestion
csharp_style_prefer_extended_property_pattern = true:suggestion

[*.{cs,vb}]
dotnet_style_operator_placement_when_wrapping = end_of_line
tab_width = 2
indent_size = 2
end_of_line = crlf
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:error
dotnet_style_prefer_inferred_tuple_names = false:error
dotnet_style_prefer_inferred_anonymous_type_member_names = false:none
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
dotnet_style_readonly_field = true:suggestion
dotnet_style_predefined_type_for_locals_parameters_members = true:error
dotnet_style_predefined_type_for_member_access = true:error
dotnet_style_require_accessibility_modifiers = for_non_interface_members:error
dotnet_style_allow_multiple_blank_lines_experimental = false:warning
dotnet_style_allow_statement_immediately_after_block_experimental = false:warning
dotnet_code_quality_unused_parameters = all:suggestion
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:suggestion
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
dotnet_style_qualification_for_field = true:error
dotnet_style_qualification_for_property = false:error
dotnet_style_qualification_for_method = false:error
dotnet_style_qualification_for_event = false:error
0

Hello Michael Zehr,

 

thank you for the provided info. 

However, I couldn't reproduce the problem you've specified with the provided .editorconfig file. With this file ReSharper doesn't wrap method calls after the opening parenthesis.

Could you please also provide the following info:

  • Could you please provide all dotSettings files via ReSharper | Manage Options | right-click on each layer | Export to file.
  • screenshot of ReSharper | Windows | File Formatting Info.

You can share the info using our service.

Thank you.

0

Here is the uploaded file:

Upload id: 2024_04_18_Kg6UKgwqX9YRtorM5uZXYr (file: OverriddenByEditorconfig.zip)

Thank you very much. For me personally it is no longer urgent or important, as the problem can be avoided by adding the setting directly in the .editorconfig. But in my opinion it is still a bug, because the designer indicates that it should not make a wrap, but then it makes a wrap anyway. The designer for the .editorconfig shows that wrapping is enabled. When saving, however, the option is added to the file. This means that the option was not previously present in the .editorconfig. So the standard designer should also show that the wrap is switched on. Settings that are not present in the .editorconfig and therefore fall back to default values should not overwrite the settings from This Computer etc.

0

Please sign in to leave a comment.