-
Notifications
You must be signed in to change notification settings - Fork 11
/
.editorconfig
167 lines (132 loc) · 6.62 KB
/
.editorconfig
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
[*]
# Non-configurable behaviors
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
# Configurable behaviors
# end_of_line = lf - there is no 'auto' with a .editorconfig
indent_style = space
indent_size = 4
max_line_length = 120
# XML project files
[*.{csproj,vbproj,vcxproj,vcxproj.filters,proj,projitems,shproj}]
indent_size = 2
# XML config files
[*.{props,targets,ruleset,config,nuspec,resx,vsixmanifest,vsct}]
indent_size = 2
[*.{cs,vb}]
dotnet_sort_system_directives_first = true
dotnet_separate_import_directive_groups = false
end_of_line = crlf
#### Naming styles ####
# Interfaces start with 'I'
dotnet_naming_symbols.interface.applicable_kinds = interface
dotnet_naming_style.begins_with_i.required_prefix = I
dotnet_naming_style.begins_with_i.required_suffix =
dotnet_naming_style.begins_with_i.word_separator =
dotnet_naming_style.begins_with_i.capitalization = pascal_case
dotnet_naming_rule.interface_should_be_begins_with_i.severity = warning
dotnet_naming_rule.interface_should_be_begins_with_i.symbols = interface
dotnet_naming_rule.interface_should_be_begins_with_i.style = begins_with_i
# Types should be PascalCase
dotnet_naming_symbols.types.applicable_kinds = class, struct, interface, enum, namespace, delegate
dotnet_naming_rule.types_should_be_pascal_case.severity = warning
dotnet_naming_rule.types_should_be_pascal_case.symbols = types
dotnet_naming_rule.types_should_be_pascal_case.style = pascal_case
# Non-private members should be PascalCase
dotnet_naming_symbols.non_private_members.applicable_kinds = property, event, field
dotnet_naming_symbols.non_private_members.applicable_accessibilities = public, internal, protected, protected_internal
dotnet_naming_rule.non_private_members_should_be_pascal_case.severity = warning
dotnet_naming_rule.non_private_members_should_be_pascal_case.symbols = non_private_members
dotnet_naming_rule.non_private_members_should_be_pascal_case.style = pascal_case
# All methods should be PascalCase
dotnet_naming_symbols.methods.applicable_kinds = method, local_function
dotnet_naming_rule.methods_should_be_pascal_case.severity = warning
dotnet_naming_rule.methods_should_be_pascal_case.symbols = methods
dotnet_naming_rule.methods_should_be_pascal_case.style = pascal_case
# Private member should be '_' prefixed and camelCase
dotnet_naming_symbols.private_members.applicable_kinds = property, event, field
dotnet_naming_symbols.private_members.applicable_accessibilities = private, private_protected
dotnet_naming_style.__prefixed_camel_case.required_prefix = _
dotnet_naming_style.__prefixed_camel_case.required_suffix =
dotnet_naming_style.__prefixed_camel_case.word_separator =
dotnet_naming_style.__prefixed_camel_case.capitalization = camel_case
dotnet_naming_rule.private_members_should_be___prefixed_camel_case.severity = warning
dotnet_naming_rule.private_members_should_be___prefixed_camel_case.symbols = private_members
dotnet_naming_rule.private_members_should_be___prefixed_camel_case.style = __prefixed_camel_case
# Const fields should be PascalCase
dotnet_naming_rule.constant_fields_should_be_pascal_case.severity = warning
dotnet_naming_rule.constant_fields_should_be_pascal_case.symbols = constant_fields
dotnet_naming_rule.constant_fields_should_be_pascal_case.style = pascal_case
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
# General naming styles
dotnet_naming_style.pascal_case.required_prefix =
dotnet_naming_style.pascal_case.required_suffix =
dotnet_naming_style.pascal_case.word_separator =
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_operator_placement_when_wrapping = beginning_of_line
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
csharp_using_directive_placement = outside_namespace:silent
csharp_prefer_simple_using_statement = true:suggestion
csharp_prefer_braces = true:silent
csharp_style_prefer_method_group_conversion = true:silent
csharp_style_prefer_top_level_statements = true:silent
csharp_style_expression_bodied_methods = false:silent
csharp_style_expression_bodied_constructors = false:silent
csharp_style_expression_bodied_operators = false:silent
csharp_style_expression_bodied_properties = true:silent
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_indent_labels = one_less_than_current
csharp_style_prefer_primary_constructors = false:suggestion
resharper_convert_to_primary_constructor_highlighting = none
csharp_style_namespace_declarations = file_scoped:error
# Naming rule violation
dotnet_diagnostic.IDE1006.severity = error
# Unused usings
dotnet_diagnostic.IDE0005.severity = warning
dotnet_diagnostic.CA1825.severity = warning
# IDE0052: Remove unread private member
dotnet_diagnostic.IDE0052.severity = warning
# CA1848: Use the LoggerMessage delegates
dotnet_diagnostic.CA1848.severity = none
# CA1727: Use PascalCase for named placeholders
dotnet_diagnostic.CA1727.severity = suggestion
# CA2254: Template should be a static expression
dotnet_diagnostic.CA2254.severity = none
# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = warning
# IDE0080: Remove unnecessary suppression operator
dotnet_diagnostic.IDE0080.severity = error
# CA1859: Use concrete types when possible for improved performance
dotnet_diagnostic.CA1859.severity = warning
# CA1716: Rename namespace "" so that it no longer conflicts with the reserved language keyword 'Interface'
# TODO: fixing this would be breaking
dotnet_diagnostic.CA1716.severity = suggestion
# CA1805: Do not initialize unnecessarily
dotnet_diagnostic.CA1805.severity = suggestion
# CA1711: Identifiers should not have incorrect suffix
# TODO: fixing this would be breaking
dotnet_diagnostic.CA1711.severity = suggestion
# CA2201: Do not raise reserved exception types
dotnet_diagnostic.CA2201.severity = suggestion
# CA1720: Identifier contains type name
# TODO: fixing this would be breaking
dotnet_diagnostic.CA1720.severity = suggestion
# CA1816: Call GC.SuppressFinalize correctly
dotnet_diagnostic.CA1816.severity = warning
[Program.cs]
dotnet_diagnostic.CA1050.severity = none
dotnet_diagnostic.S1118.severity = none
[*.{yml,yaml}]
indent_size = 2
end_of_line = lf