Skip to content

Commit 4bf2cd6

Browse files
authored
Add support for VS 16.8 which introduced breaking changes (#42)
1 parent 1f11df0 commit 4bf2cd6

File tree

1 file changed

+66
-57
lines changed

1 file changed

+66
-57
lines changed

.editorconfig

Lines changed: 66 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
# Version: 1.6.2 (Using https://semver.org/)
2-
# Updated: 2020-11-02
1+
# Version: 2.0.0 (Using https://semver.org/)
2+
# Updated: 2020-11-15
33
# See https://github.com/RehanSaeed/EditorConfig/releases for release notes.
44
# See https://github.com/RehanSaeed/EditorConfig for updates to this file.
55
# See http://EditorConfig.org for more information about .editorconfig files.
@@ -80,106 +80,115 @@ indent_style = tab
8080
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions
8181
##########################################
8282

83+
# Default Severity for .NET Code Style
84+
# https://docs.microsoft.com/dotnet/fundamentals/code-analysis/configuration-options#scope
85+
dotnet_analyzer_diagnostic.severity = warning
86+
8387
# .NET Code Style Settings
8488
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#net-code-style-settings
8589
[*.{cs,csx,cake,vb,vbx}]
8690
# "this." and "Me." qualifiers
8791
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#this-and-me
88-
dotnet_style_qualification_for_field = true:warning
89-
dotnet_style_qualification_for_property = true:warning
90-
dotnet_style_qualification_for_method = true:warning
91-
dotnet_style_qualification_for_event = true:warning
92+
dotnet_style_qualification_for_field = true
93+
dotnet_style_qualification_for_property = true
94+
dotnet_style_qualification_for_method = true
95+
dotnet_style_qualification_for_event = true
9296
# Language keywords instead of framework type names for type references
9397
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#language-keywords
94-
dotnet_style_predefined_type_for_locals_parameters_members = true:warning
95-
dotnet_style_predefined_type_for_member_access = true:warning
98+
dotnet_style_predefined_type_for_locals_parameters_members = true
99+
dotnet_style_predefined_type_for_member_access = true
96100
# Modifier preferences
97101
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#normalize-modifiers
98-
dotnet_style_require_accessibility_modifiers = always:warning
99-
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:warning
100-
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:warning
101-
dotnet_style_readonly_field = true:warning
102+
dotnet_style_require_accessibility_modifiers = always
103+
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async
104+
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
105+
dotnet_style_readonly_field = true
102106
# Parentheses preferences
103107
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parentheses-preferences
104-
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:warning
105-
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:warning
106-
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:warning
107-
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:suggestion
108+
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity
109+
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity
110+
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity
111+
dotnet_style_parentheses_in_other_operators = always_for_clarity
108112
# Expression-level preferences
109113
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
110-
dotnet_style_object_initializer = true:warning
111-
dotnet_style_collection_initializer = true:warning
112-
dotnet_style_explicit_tuple_names = true:warning
113-
dotnet_style_prefer_inferred_tuple_names = true:warning
114-
dotnet_style_prefer_inferred_anonymous_type_member_names = true:warning
115-
dotnet_style_prefer_auto_properties = true:warning
116-
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:warning
117-
dotnet_style_prefer_conditional_expression_over_assignment = false:suggestion
118-
dotnet_style_prefer_conditional_expression_over_return = false:suggestion
119-
dotnet_style_prefer_compound_assignment = true:warning
114+
dotnet_style_object_initializer = true
115+
dotnet_style_collection_initializer = true
116+
dotnet_style_explicit_tuple_names = true
117+
dotnet_style_prefer_inferred_tuple_names = true
118+
dotnet_style_prefer_inferred_anonymous_type_member_names = true
119+
dotnet_style_prefer_auto_properties = true
120+
dotnet_style_prefer_is_null_check_over_reference_equality_method = true
121+
dotnet_style_prefer_conditional_expression_over_assignment = false
122+
dotnet_diagnostic.IDE0045.severity = suggestion
123+
dotnet_style_prefer_conditional_expression_over_return = false
124+
dotnet_diagnostic.IDE0046.severity = suggestion
125+
dotnet_style_prefer_compound_assignment = true
120126
# Null-checking preferences
121127
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#null-checking-preferences
122-
dotnet_style_coalesce_expression = true:warning
123-
dotnet_style_null_propagation = true:warning
128+
dotnet_style_coalesce_expression = true
129+
dotnet_style_null_propagation = true
124130
# Parameter preferences
125131
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#parameter-preferences
126-
dotnet_code_quality_unused_parameters = all:warning
132+
dotnet_code_quality_unused_parameters = all
127133
# More style options (Undocumented)
128134
# https://github.com/MicrosoftDocs/visualstudio-docs/issues/3641
129135
dotnet_style_operator_placement_when_wrapping = end_of_line
130136
# https://github.com/dotnet/roslyn/pull/40070
131-
dotnet_style_prefer_simplified_interpolation = true:warning
137+
dotnet_style_prefer_simplified_interpolation = true
132138

133139
# C# Code Style Settings
134140
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-code-style-settings
135141
[*.{cs,csx,cake}]
136142
# Implicit and explicit types
137143
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#implicit-and-explicit-types
138-
csharp_style_var_for_built_in_types = true:warning
139-
csharp_style_var_when_type_is_apparent = true:warning
140-
csharp_style_var_elsewhere = true:warning
144+
csharp_style_var_for_built_in_types = true
145+
csharp_style_var_when_type_is_apparent = true
146+
csharp_style_var_elsewhere = true
141147
# Expression-bodied members
142148
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-bodied-members
143-
csharp_style_expression_bodied_methods = true:warning
144-
csharp_style_expression_bodied_constructors = true:warning
145-
csharp_style_expression_bodied_operators = true:warning
146-
csharp_style_expression_bodied_properties = true:warning
147-
csharp_style_expression_bodied_indexers = true:warning
148-
csharp_style_expression_bodied_accessors = true:warning
149-
csharp_style_expression_bodied_lambdas = true:warning
150-
csharp_style_expression_bodied_local_functions = true:warning
149+
csharp_style_expression_bodied_methods = true
150+
csharp_style_expression_bodied_constructors = true
151+
csharp_style_expression_bodied_operators = true
152+
csharp_style_expression_bodied_properties = true
153+
csharp_style_expression_bodied_indexers = true
154+
csharp_style_expression_bodied_accessors = true
155+
csharp_style_expression_bodied_lambdas = true
156+
csharp_style_expression_bodied_local_functions = true
151157
# Pattern matching
152158
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#pattern-matching
153-
csharp_style_pattern_matching_over_is_with_cast_check = true:warning
154-
csharp_style_pattern_matching_over_as_with_null_check = true:warning
159+
csharp_style_pattern_matching_over_is_with_cast_check = true
160+
csharp_style_pattern_matching_over_as_with_null_check = true
155161
# Inlined variable declarations
156162
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#inlined-variable-declarations
157-
csharp_style_inlined_variable_declaration = true:warning
163+
csharp_style_inlined_variable_declaration = true
158164
# Expression-level preferences
159165
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#expression-level-preferences
160-
csharp_prefer_simple_default_expression = true:warning
166+
csharp_prefer_simple_default_expression = true
161167
# "Null" checking preferences
162168
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#c-null-checking-preferences
163-
csharp_style_throw_expression = true:warning
164-
csharp_style_conditional_delegate_call = true:warning
169+
csharp_style_throw_expression = true
170+
csharp_style_conditional_delegate_call = true
165171
# Code block preferences
166172
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#code-block-preferences
167-
csharp_prefer_braces = true:warning
173+
csharp_prefer_braces = true
168174
# Unused value preferences
169175
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#unused-value-preferences
170-
csharp_style_unused_value_expression_statement_preference = discard_variable:suggestion
171-
csharp_style_unused_value_assignment_preference = discard_variable:suggestion
176+
csharp_style_unused_value_expression_statement_preference = discard_variable
177+
dotnet_diagnostic.IDE0058.severity = suggestion
178+
csharp_style_unused_value_assignment_preference = discard_variable
179+
dotnet_diagnostic.IDE0059.severity = suggestion
172180
# Index and range preferences
173181
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#index-and-range-preferences
174-
csharp_style_prefer_index_operator = true:warning
175-
csharp_style_prefer_range_operator = true:warning
182+
csharp_style_prefer_index_operator = true
183+
csharp_style_prefer_range_operator = true
176184
# Miscellaneous preferences
177185
# https://docs.microsoft.com/visualstudio/ide/editorconfig-language-conventions#miscellaneous-preferences
178-
csharp_style_deconstructed_variable_declaration = true:warning
179-
csharp_style_pattern_local_over_anonymous_function = true:warning
180-
csharp_using_directive_placement = inside_namespace:warning
181-
csharp_prefer_static_local_function = true:warning
182-
csharp_prefer_simple_using_statement = true:suggestion
186+
csharp_style_deconstructed_variable_declaration = true
187+
csharp_style_pattern_local_over_anonymous_function = true
188+
csharp_using_directive_placement = inside_namespace
189+
csharp_prefer_static_local_function = true
190+
csharp_prefer_simple_using_statement = true
191+
dotnet_diagnostic.IDE0063.severity = suggestion
183192

184193
##########################################
185194
# .NET Formatting Conventions

0 commit comments

Comments
 (0)