1
1
# ##############################
2
2
# Core EditorConfig Options #
3
3
# ##############################
4
-
5
4
root = true
6
-
7
5
# All files
8
6
[* ]
9
7
indent_style = space
10
- insert_final_newline = true
11
- charset = utf-8
12
-
13
- # Code files
14
- [* .{cs,csx,vb,vbx} ]
15
- indent_size = 4
16
8
17
- [* .yml ]
9
+ # XML project files
10
+ [* .{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj} ]
18
11
indent_size = 2
19
12
20
- [* .json ]
13
+ # XML config files
14
+ [* .{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct} ]
21
15
indent_size = 2
22
16
17
+ # Code files
18
+ [* .{cs,csx,vb,vbx} ]
19
+ indent_size = 4
20
+ insert_final_newline = true
21
+ charset = utf-8
23
22
# ##############################
24
23
# .NET Coding Conventions #
25
24
# ##############################
26
-
27
25
[* .{cs,vb} ]
28
26
# Organize usings
29
27
dotnet_sort_system_directives_first = true
30
- dotnet_separate_import_directive_groups = false
31
-
32
28
# this. preferences
33
29
dotnet_style_qualification_for_field = true :warning
34
30
dotnet_style_qualification_for_property = true :warning
35
31
dotnet_style_qualification_for_method = true :warning
36
32
dotnet_style_qualification_for_event = true :warning
37
-
38
33
# Language keywords vs BCL types preferences
39
34
dotnet_style_predefined_type_for_locals_parameters_members = true :silent
40
35
dotnet_style_predefined_type_for_member_access = true :silent
41
-
42
36
# Parentheses preferences
43
37
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
44
38
dotnet_style_parentheses_in_relational_binary_operators = always_for_clarity:silent
45
39
dotnet_style_parentheses_in_other_binary_operators = always_for_clarity:silent
46
40
dotnet_style_parentheses_in_other_operators = never_if_unnecessary:silent
47
-
48
41
# Modifier preferences
49
42
dotnet_style_require_accessibility_modifiers = for_non_interface_members:silent
50
43
dotnet_style_readonly_field = true :suggestion
51
-
52
44
# Expression-level preferences
53
45
dotnet_style_object_initializer = true :suggestion
54
46
dotnet_style_collection_initializer = true :suggestion
@@ -61,63 +53,50 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
61
53
dotnet_style_prefer_auto_properties = true :silent
62
54
dotnet_style_prefer_conditional_expression_over_assignment = true :silent
63
55
dotnet_style_prefer_conditional_expression_over_return = true :silent
64
-
65
56
# ##############################
66
57
# Naming Conventions #
67
58
# ##############################
68
-
69
59
# Style Definitions
70
60
dotnet_naming_style.pascal_case_style.capitalization = pascal_case
71
-
72
- # Use PascalCase for constant fields
61
+ # Use PascalCase for constant fields
73
62
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = suggestion
74
63
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
75
64
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case_style
76
65
dotnet_naming_symbols.constant_fields.applicable_kinds = field
77
66
dotnet_naming_symbols.constant_fields.applicable_accessibilities = *
78
67
dotnet_naming_symbols.constant_fields.required_modifiers = const
79
-
80
68
# ##############################
81
- # C# Code Style Rules #
69
+ # C# Coding Conventions #
82
70
# ##############################
83
-
84
71
[* .cs ]
85
72
# var preferences
86
73
csharp_style_var_for_built_in_types = false :warning
87
- csharp_style_var_when_type_is_apparent = true : suggestion
74
+ csharp_style_var_when_type_is_apparent = false : warning
88
75
csharp_style_var_elsewhere = false :warning
89
-
90
76
# Expression-bodied members
91
- csharp_style_expression_bodied_methods = when_on_single_line:suggestion
92
- csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
93
- csharp_style_expression_bodied_operators = when_on_single_line:suggestion
94
- csharp_style_expression_bodied_properties = when_on_single_line:suggestion
95
- csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
96
- csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
97
- csharp_style_expression_bodied_lambdas = when_on_single_line:suggestion
98
-
99
- # Pattern-matching preferences
77
+ csharp_style_expression_bodied_methods = false :silent
78
+ csharp_style_expression_bodied_constructors = false :silent
79
+ csharp_style_expression_bodied_operators = false :silent
80
+ csharp_style_expression_bodied_properties = true :silent
81
+ csharp_style_expression_bodied_indexers = true :silent
82
+ csharp_style_expression_bodied_accessors = true :silent
83
+ # Pattern matching preferences
100
84
csharp_style_pattern_matching_over_is_with_cast_check = true :suggestion
101
85
csharp_style_pattern_matching_over_as_with_null_check = true :suggestion
102
-
103
86
# Null-checking preferences
104
87
csharp_style_throw_expression = true :suggestion
105
88
csharp_style_conditional_delegate_call = true :suggestion
106
-
107
89
# Modifier preferences
108
90
csharp_preferred_modifier_order = public,private,protected,internal,static,extern,new,virtual,abstract,sealed,override,readonly,unsafe,volatile,async:suggestion
109
-
110
91
# Expression-level preferences
111
- csharp_prefer_braces = true :warning
92
+ csharp_prefer_braces = true :silent
112
93
csharp_style_deconstructed_variable_declaration = true :suggestion
113
94
csharp_prefer_simple_default_expression = true :suggestion
114
95
csharp_style_pattern_local_over_anonymous_function = true :suggestion
115
96
csharp_style_inlined_variable_declaration = true :suggestion
116
-
117
97
# ##############################
118
98
# C# Formatting Rules #
119
99
# ##############################
120
-
121
100
# New line preferences
122
101
csharp_new_line_before_open_brace = all
123
102
csharp_new_line_before_else = true
@@ -126,12 +105,10 @@ csharp_new_line_before_finally = true
126
105
csharp_new_line_before_members_in_object_initializers = true
127
106
csharp_new_line_before_members_in_anonymous_types = true
128
107
csharp_new_line_between_query_expression_clauses = true
129
-
130
108
# Indentation preferences
131
109
csharp_indent_case_contents = true
132
110
csharp_indent_switch_labels = true
133
111
csharp_indent_labels = flush_left
134
-
135
112
# Space preferences
136
113
csharp_space_after_cast = false
137
114
csharp_space_after_keywords_in_control_flow_statements = true
@@ -144,15 +121,12 @@ csharp_space_around_binary_operators = before_and_after
144
121
csharp_space_between_method_declaration_empty_parameter_list_parentheses = false
145
122
csharp_space_between_method_call_name_and_opening_parenthesis = false
146
123
csharp_space_between_method_call_empty_parameter_list_parentheses = false
147
-
148
124
# Wrapping preferences
149
125
csharp_preserve_single_line_statements = true
150
126
csharp_preserve_single_line_blocks = true
151
-
152
- # #################################
153
- # Visual Basic Code Style Rules #
154
- # #################################
155
-
127
+ # ##############################
128
+ # VB Coding Conventions #
129
+ # ##############################
156
130
[* .vb ]
157
131
# Modifier preferences
158
132
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:suggestion
0 commit comments