1- # http://EditorConfig.org
2- # https://docs.microsoft.com/en-us/visualstudio/ide/editorconfig-code-style-settings-reference
1+ # EditorConfig is awesome:http://EditorConfig.org
32
3+ # top-most EditorConfig file
44root = true
55
6+ # Don't use tabs for indentation.
67[* ]
7- charset = utf-8
8- end_of_line = crlf
9- indent_size = 2
108indent_style = space
11- insert_final_newline = true
12- trim_trailing_whitespace = true
9+ # (Please don't specify an indent_size here; that has too many unintended consequences.)
1310
14- [* .md ]
11+ # Code files
12+ [* .{cs,csx,vb,vbx} ]
1513indent_size = 4
16- trim_trailing_whitespace = false
1714
15+ # Xml project files
16+ [* .{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj} ]
17+ indent_size = 2
18+
19+ # Xml config files
20+ [* .{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct} ]
21+ indent_size = 2
22+
23+ # JSON files
24+ [* .json ]
25+ indent_size = 2
1826
1927# Dotnet code style settings:
2028[* .{cs, vb} ]
21- indent_size = 4
22-
29+ # Sort using and Import directives with System.* appearing first
30+ dotnet_sort_system_directives_first = true
2331# Avoid "this." and "Me." if not necessary
2432dotnet_style_qualification_for_field = false :suggestion
2533dotnet_style_qualification_for_property = false :suggestion
2634dotnet_style_qualification_for_method = false :suggestion
2735dotnet_style_qualification_for_event = false :suggestion
2836
2937# Use language keywords instead of framework type names for type references
30- dotnet_style_predefined_type_for_locals_parameters_members = true :error
31- dotnet_style_predefined_type_for_member_access = false :error
38+ dotnet_style_predefined_type_for_locals_parameters_members = true :suggestion
39+ dotnet_style_predefined_type_for_member_access = false :suggestion
3240
3341# Suggest more modern language features when available
3442dotnet_style_object_initializer = true :suggestion
@@ -39,18 +47,15 @@ dotnet_style_explicit_tuple_names = true:suggestion
3947
4048# CSharp code style settings:
4149[* .cs ]
42- # K&R styling
43- csharp_new_line_before_open_brace = none:error
44-
4550# Prefer "var" everywhere
46- csharp_style_var_for_built_in_types = false :error
51+ csharp_style_var_for_built_in_types = false :suggestion
4752csharp_style_var_when_type_is_apparent = true :suggestion
4853csharp_style_var_elsewhere = true :suggestion
4954
5055# Prefer method-like constructs to have a block body
51- csharp_style_expression_bodied_methods = true :none
52- csharp_style_expression_bodied_constructors = true :none
53- csharp_style_expression_bodied_operators = true :none
56+ csharp_style_expression_bodied_methods = false :none
57+ csharp_style_expression_bodied_constructors = false :none
58+ csharp_style_expression_bodied_operators = false :none
5459
5560# Prefer property-like constructs to have an expression-body
5661csharp_style_expression_bodied_properties = true :none
@@ -62,4 +67,12 @@ csharp_style_pattern_matching_over_is_with_cast_check = true:suggestion
6267csharp_style_pattern_matching_over_as_with_null_check = true :suggestion
6368csharp_style_inlined_variable_declaration = true :suggestion
6469csharp_style_throw_expression = true :suggestion
65- csharp_style_conditional_delegate_call = true :suggestion
70+ csharp_style_conditional_delegate_call = true :suggestion
71+
72+ # Newline settings
73+ csharp_new_line_before_open_brace = false :error
74+ csharp_new_line_before_else = false :error
75+ csharp_new_line_before_catch = false :error
76+ csharp_new_line_before_finally = false :error
77+ csharp_new_line_before_members_in_object_initializers = false :error
78+ csharp_new_line_before_members_in_anonymous_types = false :error
0 commit comments