1- root =true
2-
3- [* .cs ]
4- trim_trailing_whitespace =true
5- insert_final_newline =true
6-
7- [* ]
8- indent_style = tab
9- indent_size = 4
10-
11- [* .cshtml ]
12- indent_style = tab
13- indent_size = 4
14-
15- [* .{fs,fsx,yml} ]
16- indent_style = space
17- indent_size = 4
18-
19- [* .{md,markdown,json,js,csproj,fsproj,targets,targets,props} ]
20- indent_style = space
21- indent_size = 2
22-
231# Dotnet code style settings:
242[* .{cs,vb} ]
253
26- # ---
27- # naming conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-naming-conventions
28- # currently not supported in Rider/Resharper so not using these for now
29- # ---
30-
31- # ---
32- # langugage conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#language-conventions
33-
344# Sort using and Import directives with System.* appearing first
355dotnet_sort_system_directives_first = true
366
377# Prefer this.X except for _fields
388# TODO can we force _ for private fields?
399# TODO elevate severity after code cleanup to warning minimum
4010# TODO use language latest
41- dotnet_style_qualification_for_field = false :error
42- dotnet_style_qualification_for_property = false :error
43- dotnet_style_qualification_for_method = false :error
44- dotnet_style_qualification_for_event = false :error
11+ dotnet_style_qualification_for_field = false :suggestion
12+ dotnet_style_qualification_for_property = false :suggestion
13+ dotnet_style_qualification_for_method = false :suggestion
14+ dotnet_style_qualification_for_event = false :suggestion
4515
4616# Use language keywords instead of framework type names for type references
47- dotnet_style_predefined_type_for_locals_parameters_members = true :error
48- dotnet_style_predefined_type_for_member_access = true :error
17+ dotnet_style_predefined_type_for_locals_parameters_members = true :suggestion
18+ dotnet_style_predefined_type_for_member_access = true :suggestion
4919
5020# Suggest more modern language features when available
51- dotnet_style_object_initializer = true :error
52- dotnet_style_collection_initializer = true :error
53- dotnet_style_explicit_tuple_names = true :error
54- dotnet_style_prefer_inferred_anonymous_type_member_names = true :error
55- dotnet_style_prefer_inferred_tuple_names = true :error
56- dotnet_style_coalesce_expression = true :error
57- dotnet_style_null_propagation = true :error
21+ dotnet_style_object_initializer = true :suggestion
22+ dotnet_style_collection_initializer = true :suggestion
23+ dotnet_style_explicit_tuple_names = true :suggestion
24+ dotnet_style_prefer_inferred_anonymous_type_member_names = true :suggestion
25+ dotnet_style_prefer_inferred_tuple_names = true :suggestion
26+ dotnet_style_coalesce_expression = true :suggestion
27+ dotnet_style_null_propagation = true :suggestion
5828
59- dotnet_style_require_accessibility_modifiers = for_non_interface_members:error
60- dotnet_style_readonly_field = true :error
29+ dotnet_style_require_accessibility_modifiers = for_non_interface_members:suggestion
30+ dotnet_style_readonly_field = true :suggestion
6131
6232# CSharp code style settings:
6333[* .cs ]
6434# Prefer "var" everywhere
65- csharp_style_var_for_built_in_types = true :error
66- csharp_style_var_when_type_is_apparent = true :error
67- csharp_style_var_elsewhere = true :error
35+ csharp_style_var_for_built_in_types = true :suggestion
36+ csharp_style_var_when_type_is_apparent = true :suggestion
37+ csharp_style_var_elsewhere = true :suggestion
6838
69- csharp_style_expression_bodied_methods = true :error
70- csharp_style_expression_bodied_constructors = true :error
71- csharp_style_expression_bodied_operators = true :error
72- csharp_style_expression_bodied_properties = true :error
73- csharp_style_expression_bodied_indexers = true :error
74- csharp_style_expression_bodied_accessors = true :error
39+ csharp_style_expression_bodied_methods = true :suggestion
40+ csharp_style_expression_bodied_constructors = true :suggestion
41+ csharp_style_expression_bodied_operators = true :suggestion
42+ csharp_style_expression_bodied_properties = true :suggestion
43+ csharp_style_expression_bodied_indexers = true :suggestion
44+ csharp_style_expression_bodied_accessors = true :suggestion
7545
7646# Suggest more modern language features when available
77- csharp_style_pattern_matching_over_is_with_cast_check = true :error
78- csharp_style_pattern_matching_over_as_with_null_check = true :error
79- csharp_style_inlined_variable_declaration = true :error
80- csharp_style_deconstructed_variable_declaration = true :error
81- csharp_style_pattern_local_over_anonymous_function = true :error
82- csharp_style_throw_expression = true :error
83- csharp_style_conditional_delegate_call = true :error
47+ csharp_style_pattern_matching_over_is_with_cast_check = true :suggestion
48+ csharp_style_pattern_matching_over_as_with_null_check = true :suggestion
49+ csharp_style_inlined_variable_declaration = true :suggestion
50+ csharp_style_deconstructed_variable_declaration = true :suggestion
51+ csharp_style_pattern_local_over_anonymous_function = true :suggestion
52+ csharp_style_throw_expression = true :suggestion
53+ csharp_style_conditional_delegate_call = true :suggestion
8454
85- csharp_prefer_braces = false :warning
86- csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:error
55+ csharp_prefer_braces = false :suggestion
56+ csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
8757
8858# ---
8959# formatting conventions https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference#formatting-conventions
9060
9161# Newline settings (Allman yo!)
92- csharp_new_line_before_open_brace = all:error
93- csharp_new_line_before_else = true :error
94- csharp_new_line_before_catch = true :error
95- csharp_new_line_before_finally = true :error
62+ csharp_new_line_before_open_brace = all:suggestion
63+ csharp_new_line_before_else = true :suggestion
64+ csharp_new_line_before_catch = true :suggestion
65+ csharp_new_line_before_finally = true :suggestion
9666csharp_new_line_before_members_in_object_initializers = true
9767# just a suggestion do to our JSON tests that use anonymous types to
9868# represent json quite a bit (makes copy paste easier).
9969csharp_new_line_before_members_in_anonymous_types = true :suggestion
100- csharp_new_line_between_query_expression_clauses = true :error
70+ csharp_new_line_between_query_expression_clauses = true :suggestion
10171
10272# Indent
103- csharp_indent_case_contents = true :error
104- csharp_indent_switch_labels = true :error
105- csharp_space_after_cast = false :error
106- csharp_space_after_keywords_in_control_flow_statements = true :error
107- csharp_space_between_method_declaration_parameter_list_parentheses = false :error
108- csharp_space_between_method_call_parameter_list_parentheses = false :error
73+ csharp_indent_case_contents = true :suggestion
74+ csharp_indent_switch_labels = true :suggestion
75+ csharp_space_after_cast = false :suggestion
76+ csharp_space_after_keywords_in_control_flow_statements = true :suggestion
77+ csharp_space_between_method_declaration_parameter_list_parentheses = false :suggestion
78+ csharp_space_between_method_call_parameter_list_parentheses = false :suggestion
10979
11080# Wrap
111- csharp_preserve_single_line_statements = false :error
112- csharp_preserve_single_line_blocks = true :error
81+ csharp_preserve_single_line_statements = false :suggestion
82+ csharp_preserve_single_line_blocks = true :suggestion
11383
11484# Resharper
11585resharper_csharp_braces_for_lock =required_for_complex
@@ -123,7 +93,7 @@ resharper_csharp_braces_for_ifelse=required_for_complex
12393resharper_csharp_accessor_owner_body =expression_body
12494
12595# Override source included files
126- [{SimpleJson| SynchronizedCollection} .cs ]
96+ [SynchronizedCollection.cs ]
12797csharp_style_var_for_built_in_types = false :none
12898csharp_style_var_when_type_is_apparent = false :none
12999csharp_style_var_elsewhere = false :none
0 commit comments