1+ root = true
12
23[* ]
3- charset = utf-8-bom
4+ charset = utf-8
45end_of_line = lf
5- trim_trailing_whitespace = false
6- insert_final_newline = false
6+ trim_trailing_whitespace = true
7+ insert_final_newline = true
78indent_style = space
89indent_size = 4
910
1011# Microsoft .NET properties
11- csharp_preferred_modifier_order = public, private, protected, internal, static, abstract, virtual, sealed, override, new, readonly, extern, unsafe, volatile, async:suggestion
12+ csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new, virtual,abstract, sealed,override,readonly,unsafe,volatile,async:suggestion
1213csharp_style_var_elsewhere = true :suggestion
1314csharp_style_var_for_built_in_types = true :suggestion
1415csharp_style_var_when_type_is_apparent = true :suggestion
@@ -22,9 +23,72 @@ dotnet_style_qualification_for_field = false:suggestion
2223dotnet_style_qualification_for_method = false :suggestion
2324dotnet_style_qualification_for_property = false :suggestion
2425dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
26+ dotnet_sort_system_directives_first = true
27+ dotnet_style_readonly_field = true :suggestion
28+
29+ # Expression-level preferences
30+ dotnet_style_object_initializer = true :suggestion
31+ dotnet_style_collection_initializer = true :suggestion
32+ dotnet_style_explicit_tuple_names = true :suggestion
33+ dotnet_style_coalesce_expression = true :suggestion
34+ dotnet_style_null_propagation = true :suggestion
35+ dotnet_style_prefer_is_null_check_over_reference_equality_method = true :suggestion
36+ dotnet_style_prefer_inferred_tuple_names = true :suggestion
37+ dotnet_style_prefer_inferred_anonymous_type_member_names = true :suggestion
38+ dotnet_style_prefer_auto_properties = true :suggestion
39+ dotnet_style_prefer_conditional_expression_over_assignment = true :silent
40+ dotnet_style_prefer_conditional_expression_over_return = true :silent
41+ csharp_prefer_simple_default_expression = true :suggestion
42+
43+ # Expression-bodied members
44+ csharp_style_expression_bodied_methods = true :silent
45+ csharp_style_expression_bodied_constructors = true :silent
46+ csharp_style_expression_bodied_operators = true :silent
47+ csharp_style_expression_bodied_properties = true :silent
48+ csharp_style_expression_bodied_indexers = true :silent
49+ csharp_style_expression_bodied_accessors = true :silent
50+ csharp_style_expression_bodied_lambdas = true :silent
51+ csharp_style_expression_bodied_local_functions = true :silent
52+
53+ # Pattern matching
54+ csharp_style_pattern_matching_over_is_with_cast_check = true :suggestion
55+ csharp_style_pattern_matching_over_as_with_null_check = true :suggestion
56+ csharp_style_inlined_variable_declaration = true :suggestion
57+
58+ # Null checking preferences
59+ csharp_style_throw_expression = true :suggestion
60+ csharp_style_conditional_delegate_call = true :suggestion
61+
62+ # Other features
63+ csharp_style_prefer_index_operator = false :none
64+ csharp_style_prefer_range_operator = false :none
65+ csharp_style_pattern_local_over_anonymous_function = false :none
66+
67+ # Space preferences
68+ csharp_space_after_cast = false
69+ csharp_space_after_colon_in_inheritance_clause = true
70+ csharp_space_after_comma = true
71+ csharp_space_after_dot = false
72+ csharp_space_after_keywords_in_control_flow_statements = true
73+ csharp_space_after_semicolon_in_for_statement = true
74+ csharp_space_around_binary_operators = before_and_after
75+ csharp_space_around_declaration_statements = false
76+ csharp_space_before_colon_in_inheritance_clause = true
77+ csharp_space_before_comma = false
78+ csharp_space_before_dot = false
79+ csharp_space_before_open_square_brackets = false
80+ csharp_space_before_semicolon_in_for_statement = false
81+ csharp_space_between_empty_square_brackets = false
82+ csharp_space_between_method_call_empty_parameter_list_parentheses = false
83+ csharp_space_between_method_call_name_and_opening_parenthesis = false
84+ csharp_space_between_method_call_parameter_list_parentheses = false
85+ csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
86+ csharp_space_between_method_declaration_name_and_open_parenthesis = false
87+ csharp_space_between_method_declaration_parameter_list_parentheses = false
88+ csharp_space_between_parentheses = false
89+ csharp_space_between_square_brackets = false
2590
2691# ReSharper properties
27- resharper_autodetect_indent_settings = true
2892resharper_braces_for_for = required
2993resharper_braces_for_foreach = required
3094resharper_braces_for_ifelse = required
@@ -45,39 +109,18 @@ resharper_keep_existing_initializer_arrangement = false
45109resharper_keep_existing_invocation_parens_arrangement = false
46110resharper_keep_existing_switch_expression_arrangement = false
47111resharper_max_initializer_elements_on_line = 2
48- resharper_modifiers_order = public private protected internal static abstract virtual sealed override new readonly extern unsafe volatile async
49112resharper_place_accessorholder_attribute_on_same_line = false
50113resharper_place_field_attribute_on_same_line = false
51114resharper_place_linq_into_on_new_line = false
52115resharper_place_simple_anonymousmethod_on_single_line = false
53116resharper_place_simple_embedded_statement_on_same_line = false
54117resharper_space_between_attribute_sections = false
55- resharper_use_indent_from_vs = false
56118resharper_wrap_before_arrow_with_expressions = true
57119resharper_wrap_before_extends_colon = true
58120resharper_wrap_before_linq_expression = true
59121resharper_wrap_chained_binary_expressions = chop_if_long
60122
61123# ReSharper inspection severities
62- resharper_arrange_redundant_parentheses_highlighting = hint
63- resharper_arrange_this_qualifier_highlighting = hint
64- resharper_arrange_type_member_modifiers_highlighting = hint
65- resharper_arrange_type_modifiers_highlighting = hint
66- resharper_built_in_type_reference_style_for_member_access_highlighting = hint
67- resharper_built_in_type_reference_style_highlighting = hint
68- resharper_mvc_view_component_view_not_resolved_highlighting = none
69- resharper_redundant_base_qualifier_highlighting = warning
70- resharper_suggest_var_or_type_built_in_types_highlighting = hint
71- resharper_suggest_var_or_type_elsewhere_highlighting = hint
72- resharper_suggest_var_or_type_simple_types_highlighting = hint
73- resharper_web_config_module_not_resolved_highlighting = warning
74- resharper_web_config_type_not_resolved_highlighting = warning
75- resharper_web_config_wrong_module_highlighting = warning
76-
77- [* .{appxmanifest,asax,ascx,aspx,axaml,build,c,c++,cc,cginc,compute,cp,cpp,cs,cshtml,cu,cuh,cxx,dtd,fs,fsi,fsscript,fsx,fx,fxh,h,hh,hlsl,hlsli,hlslinc,hpp,hxx,inc,inl,ino,ipp,master,ml,mli,mpp,mq4,mq5,mqh,nuspec,paml,razor,resw,resx,skin,tpp,usf,ush,vb,xaml,xamlx,xoml,xsd} ]
78- indent_style = space
79- indent_size = 4
80- tab_width = 4
81124
82125[* .{xml,csproj} ]
83126indent_size = 2
@@ -87,46 +130,37 @@ tab_width = 2
87130[* .cs ]
88131
89132# var preferences
90- csharp_style_var_elsewhere = false :silent
91- csharp_style_var_for_built_in_types = false :silent
133+ csharp_style_var_elsewhere = false :suggestion
134+ csharp_style_var_for_built_in_types = false :suggestion
92135csharp_style_var_when_type_is_apparent = false :silent
93136
94137# Expression-bodied members
95- csharp_style_expression_bodied_accessors = true :silent
96138csharp_style_expression_bodied_constructors = false :silent
97- csharp_style_expression_bodied_indexers = true :silent
98139csharp_style_expression_bodied_lambdas = true :suggestion
99140csharp_style_expression_bodied_local_functions = false :silent
100141csharp_style_expression_bodied_methods = false :silent
101142csharp_style_expression_bodied_operators = false :silent
102- csharp_style_expression_bodied_properties = true :silent
103143
104144# Pattern matching preferences
105- csharp_style_pattern_matching_over_as_with_null_check = true :suggestion
106- csharp_style_pattern_matching_over_is_with_cast_check = true :suggestion
107145csharp_style_prefer_not_pattern = true :suggestion
108146csharp_style_prefer_pattern_matching = true :silent
109147csharp_style_prefer_switch_expression = true :suggestion
110148
111149# Null-checking preferences
112- csharp_style_conditional_delegate_call = true :suggestion
113150
114151# Modifier preferences
115- csharp_prefer_static_local_function = true :warning
152+ csharp_prefer_static_local_function = true :suggestion
116153csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:silent
117154
118155# Code-block preferences
119156csharp_prefer_braces = true :silent
120- csharp_prefer_simple_using_statement = true : suggestion
157+ csharp_prefer_simple_using_statement = false : none
121158
122159# Expression-level preferences
123- csharp_prefer_simple_default_expression = true :suggestion
124160csharp_style_deconstructed_variable_declaration = true :suggestion
125- csharp_style_inlined_variable_declaration = true :suggestion
126161csharp_style_pattern_local_over_anonymous_function = true :suggestion
127162csharp_style_prefer_index_operator = true :suggestion
128163csharp_style_prefer_range_operator = true :suggestion
129- csharp_style_throw_expression = true :suggestion
130164csharp_style_unused_value_assignment_preference = discard_variable:suggestion
131165csharp_style_unused_value_expression_statement_preference = discard_variable:silent
132166
@@ -152,36 +186,11 @@ csharp_indent_case_contents_when_block = true
152186csharp_indent_labels = one_less_than_current
153187csharp_indent_switch_labels = true
154188
155- # Space preferences
156- csharp_space_after_cast = false
157- csharp_space_after_colon_in_inheritance_clause = true
158- csharp_space_after_comma = true
159- csharp_space_after_dot = false
160- csharp_space_after_keywords_in_control_flow_statements = true
161- csharp_space_after_semicolon_in_for_statement = true
162- csharp_space_around_binary_operators = before_and_after
163- csharp_space_around_declaration_statements = false
164- csharp_space_before_colon_in_inheritance_clause = true
165- csharp_space_before_comma = false
166- csharp_space_before_dot = false
167- csharp_space_before_open_square_brackets = false
168- csharp_space_before_semicolon_in_for_statement = false
169- csharp_space_between_empty_square_brackets = false
170- csharp_space_between_method_call_empty_parameter_list_parentheses = false
171- csharp_space_between_method_call_name_and_opening_parenthesis = false
172- csharp_space_between_method_call_parameter_list_parentheses = false
173- csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
174- csharp_space_between_method_declaration_name_and_open_parenthesis = false
175- csharp_space_between_method_declaration_parameter_list_parentheses = false
176- csharp_space_between_parentheses = false
177- csharp_space_between_square_brackets = false
178-
179189# Wrapping preferences
180190csharp_preserve_single_line_blocks = true
181- csharp_preserve_single_line_statements = true
191+ csharp_preserve_single_line_statements = false
182192
183193# ### Naming styles ####
184- [* .{cs,vb} ]
185194
186195# Naming rules
187196
@@ -261,67 +270,93 @@ dotnet_naming_rule.non_field_members_should_be_pascalcase.severity = suggestion
261270dotnet_naming_rule.non_field_members_should_be_pascalcase.symbols = non_field_members
262271dotnet_naming_rule.non_field_members_should_be_pascalcase.style = pascalcase
263272
273+ # name all constant fields using PascalCase
274+ dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
275+ dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
276+ dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
277+ dotnet_naming_symbols.constant_fields.applicable_kinds = field
278+ dotnet_naming_symbols.constant_fields.required_modifiers = const
279+ dotnet_naming_style.pascal_case_style.capitalization = pascal_case
280+
281+ dotnet_naming_rule.static_fields_should_have_prefix.severity = suggestion
282+ dotnet_naming_rule.static_fields_should_have_prefix.symbols = static_fields
283+ dotnet_naming_rule.static_fields_should_have_prefix.style = static_prefix_style
284+ dotnet_naming_symbols.static_fields.applicable_kinds = field
285+ dotnet_naming_symbols.static_fields.required_modifiers = static
286+ dotnet_naming_symbols.static_fields.applicable_accessibilities = private, internal, private_protected
287+ dotnet_naming_style.static_prefix_style.required_prefix = s_
288+ dotnet_naming_style.static_prefix_style.capitalization = camel_case
289+
290+ # internal and private fields should be _camelCase
291+ dotnet_naming_rule.camel_case_for_private_internal_fields.severity = suggestion
292+ dotnet_naming_rule.camel_case_for_private_internal_fields.symbols = private_internal_fields
293+ dotnet_naming_rule.camel_case_for_private_internal_fields.style = camel_case_underscore_style
294+ dotnet_naming_symbols.private_internal_fields.applicable_kinds = field
295+ dotnet_naming_symbols.private_internal_fields.applicable_accessibilities = private, internal
296+ dotnet_naming_style.camel_case_underscore_style.required_prefix = _
297+ dotnet_naming_style.camel_case_underscore_style.capitalization = camel_case
298+
264299# Symbol specifications
265300
266301dotnet_naming_symbols.interfaces.applicable_kinds = interface
267302dotnet_naming_symbols.interfaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
268- dotnet_naming_symbols.interfaces.required_modifiers =
303+ dotnet_naming_symbols.interfaces.required_modifiers =
269304
270305dotnet_naming_symbols.enums.applicable_kinds = enum
271306dotnet_naming_symbols.enums.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
272- dotnet_naming_symbols.enums.required_modifiers =
307+ dotnet_naming_symbols.enums.required_modifiers =
273308
274309dotnet_naming_symbols.events.applicable_kinds = event
275310dotnet_naming_symbols.events.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
276- dotnet_naming_symbols.events.required_modifiers =
311+ dotnet_naming_symbols.events.required_modifiers =
277312
278313dotnet_naming_symbols.methods.applicable_kinds = method
279314dotnet_naming_symbols.methods.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
280- dotnet_naming_symbols.methods.required_modifiers =
315+ dotnet_naming_symbols.methods.required_modifiers =
281316
282317dotnet_naming_symbols.properties.applicable_kinds = property
283318dotnet_naming_symbols.properties.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
284- dotnet_naming_symbols.properties.required_modifiers =
319+ dotnet_naming_symbols.properties.required_modifiers =
285320
286321dotnet_naming_symbols.public_fields.applicable_kinds = field
287322dotnet_naming_symbols.public_fields.applicable_accessibilities = public, internal
288- dotnet_naming_symbols.public_fields.required_modifiers =
323+ dotnet_naming_symbols.public_fields.required_modifiers =
289324
290325dotnet_naming_symbols.private_fields.applicable_kinds = field
291326dotnet_naming_symbols.private_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
292- dotnet_naming_symbols.private_fields.required_modifiers =
327+ dotnet_naming_symbols.private_fields.required_modifiers =
293328
294329dotnet_naming_symbols.private_static_fields.applicable_kinds = field
295330dotnet_naming_symbols.private_static_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
296331dotnet_naming_symbols.private_static_fields.required_modifiers = static
297332
298333dotnet_naming_symbols.types_and_namespaces.applicable_kinds = namespace, class, struct, interface, enum
299334dotnet_naming_symbols.types_and_namespaces.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
300- dotnet_naming_symbols.types_and_namespaces.required_modifiers =
335+ dotnet_naming_symbols.types_and_namespaces.required_modifiers =
301336
302337dotnet_naming_symbols.non_field_members.applicable_kinds = property, event, method
303338dotnet_naming_symbols.non_field_members.applicable_accessibilities = public, internal, private, protected, protected_internal, private_protected
304- dotnet_naming_symbols.non_field_members.required_modifiers =
339+ dotnet_naming_symbols.non_field_members.required_modifiers =
305340
306341dotnet_naming_symbols.type_parameters.applicable_kinds = namespace
307342dotnet_naming_symbols.type_parameters.applicable_accessibilities = *
308- dotnet_naming_symbols.type_parameters.required_modifiers =
343+ dotnet_naming_symbols.type_parameters.required_modifiers =
309344
310345dotnet_naming_symbols.private_constant_fields.applicable_kinds = field
311346dotnet_naming_symbols.private_constant_fields.applicable_accessibilities = private, protected, protected_internal, private_protected
312347dotnet_naming_symbols.private_constant_fields.required_modifiers = const
313348
314349dotnet_naming_symbols.local_variables.applicable_kinds = local
315350dotnet_naming_symbols.local_variables.applicable_accessibilities = local
316- dotnet_naming_symbols.local_variables.required_modifiers =
351+ dotnet_naming_symbols.local_variables.required_modifiers =
317352
318353dotnet_naming_symbols.local_constants.applicable_kinds = local
319354dotnet_naming_symbols.local_constants.applicable_accessibilities = local
320355dotnet_naming_symbols.local_constants.required_modifiers = const
321356
322357dotnet_naming_symbols.parameters.applicable_kinds = parameter
323358dotnet_naming_symbols.parameters.applicable_accessibilities = *
324- dotnet_naming_symbols.parameters.required_modifiers =
359+ dotnet_naming_symbols.parameters.required_modifiers =
325360
326361dotnet_naming_symbols.public_constant_fields.applicable_kinds = field
327362dotnet_naming_symbols.public_constant_fields.applicable_accessibilities = public, internal
@@ -337,36 +372,40 @@ dotnet_naming_symbols.private_static_readonly_fields.required_modifiers = readon
337372
338373dotnet_naming_symbols.local_functions.applicable_kinds = local_function
339374dotnet_naming_symbols.local_functions.applicable_accessibilities = *
340- dotnet_naming_symbols.local_functions.required_modifiers =
375+ dotnet_naming_symbols.local_functions.required_modifiers =
341376
342377# Naming styles
343378
344- dotnet_naming_style.pascalcase.required_prefix =
345- dotnet_naming_style.pascalcase.required_suffix =
346- dotnet_naming_style.pascalcase.word_separator =
379+ dotnet_naming_style.pascalcase.required_prefix =
380+ dotnet_naming_style.pascalcase.required_suffix =
381+ dotnet_naming_style.pascalcase.word_separator =
347382dotnet_naming_style.pascalcase.capitalization = pascal_case
348383
349384dotnet_naming_style.ipascalcase.required_prefix = I
350- dotnet_naming_style.ipascalcase.required_suffix =
351- dotnet_naming_style.ipascalcase.word_separator =
385+ dotnet_naming_style.ipascalcase.required_suffix =
386+ dotnet_naming_style.ipascalcase.word_separator =
352387dotnet_naming_style.ipascalcase.capitalization = pascal_case
353388
354389dotnet_naming_style.tpascalcase.required_prefix = T
355- dotnet_naming_style.tpascalcase.required_suffix =
356- dotnet_naming_style.tpascalcase.word_separator =
390+ dotnet_naming_style.tpascalcase.required_suffix =
391+ dotnet_naming_style.tpascalcase.word_separator =
357392dotnet_naming_style.tpascalcase.capitalization = pascal_case
358393
359394dotnet_naming_style._camelcase.required_prefix = _
360- dotnet_naming_style._camelcase.required_suffix =
361- dotnet_naming_style._camelcase.word_separator =
395+ dotnet_naming_style._camelcase.required_suffix =
396+ dotnet_naming_style._camelcase.word_separator =
362397dotnet_naming_style._camelcase.capitalization = camel_case
363398
364- dotnet_naming_style.camelcase.required_prefix =
365- dotnet_naming_style.camelcase.required_suffix =
366- dotnet_naming_style.camelcase.word_separator =
399+ dotnet_naming_style.camelcase.required_prefix =
400+ dotnet_naming_style.camelcase.required_suffix =
401+ dotnet_naming_style.camelcase.word_separator =
367402dotnet_naming_style.camelcase.capitalization = camel_case
368403
369404dotnet_naming_style.s_camelcase.required_prefix = s_
370- dotnet_naming_style.s_camelcase.required_suffix =
371- dotnet_naming_style.s_camelcase.word_separator =
372- dotnet_naming_style.s_camelcase.capitalization = camel_case
405+ dotnet_naming_style.s_camelcase.required_suffix =
406+ dotnet_naming_style.s_camelcase.word_separator =
407+ dotnet_naming_style.s_camelcase.capitalization = camel_case
408+
409+ # Xml config files
410+ [* .{props,targets,config,nuspec} ]
411+ indent_size = 2
0 commit comments