-
Notifications
You must be signed in to change notification settings - Fork 3
/
.editorconfig
165 lines (119 loc) · 6.43 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
root = true
[*]
charset = utf-8
insert_final_newline = true
trim_trailing_whitespace = true
[*.cs]
indent_style = space
indent_size = 4
[*.{sln,*proj,dotsettings}]
charset = utf-8-bom
[*.md]
trim_trailing_whitespace = false
[*]
csharp_indent_case_contents_when_block = false
dotnet_style_collection_initializer = true:silent
csharp_style_conditional_delegate_call = true:error
csharp_style_deconstructed_variable_declaration = true:silent
dotnet_style_object_initializer = true:silent
dotnet_sort_system_directives_first = true
dotnet_code_quality_unused_parameters = all:silent
dotnet_style_explicit_tuple_names = true:error
dotnet_style_predefined_type_for_locals_parameters_members = true:error
dotnet_style_predefined_type_for_member_access = true:error
dotnet_style_readonly_field = true:error
csharp_style_var_elsewhere = true:silent
csharp_style_var_for_built_in_types = true:silent
csharp_style_var_when_type_is_apparent = true:silent
# Override ReSharper defaults
csharp_space_after_cast = false
resharper_csharp_space_within_single_line_array_initializer_braces = true # https://www.jetbrains.com/help/resharper/EditorConfig_CSHARP_SpacesPageSchema.html#resharper_csharp_space_within_single_line_array_initializer_braces
# The first matching rule wins, more specific rules at the top
# dotnet_naming_rule.*.symbols does not yet support a comma-separated list https://github.com/dotnet/roslyn/issues/20891
# dotnet_naming_symbols.*.applicable_kinds does not yet support namespace, type_parameter or local https://github.com/dotnet/roslyn/issues/18121
dotnet_naming_style.interfaces.required_prefix = I
dotnet_naming_style.interfaces.capitalization = pascal_case # Needed or VS ignores all naming rules https://github.com/dotnet/roslyn/issues/20895
dotnet_naming_symbols.interfaces.applicable_kinds = interface
dotnet_naming_rule.interfaces.severity = error
dotnet_naming_rule.interfaces.symbols = interfaces
dotnet_naming_rule.interfaces.style = interfaces
dotnet_naming_style.pascal_case.capitalization = pascal_case
dotnet_naming_symbols.namespaces_types_and_non_field_members.applicable_kinds = namespace, class, struct, enum, interface, delegate, type_parameter, method, property, event
dotnet_naming_rule.namespaces_types_and_non_field_members.severity = warning
dotnet_naming_rule.namespaces_types_and_non_field_members.symbols = namespaces_types_and_non_field_members
dotnet_naming_rule.namespaces_types_and_non_field_members.style = pascal_case
dotnet_naming_symbols.non_private_fields.applicable_kinds = field
dotnet_naming_symbols.non_private_fields.applicable_accessibilities = public, protected, protected_internal, internal
dotnet_naming_rule.non_private_fields.severity = warning
dotnet_naming_rule.non_private_fields.symbols = non_private_fields
dotnet_naming_rule.non_private_fields.style = pascal_case
dotnet_naming_symbols.static_readonly_fields.applicable_kinds = field
dotnet_naming_symbols.static_readonly_fields.required_modifiers = static, readonly
dotnet_naming_rule.static_readonly_fields.severity = warning
dotnet_naming_rule.static_readonly_fields.symbols = static_readonly_fields
dotnet_naming_rule.static_readonly_fields.style = pascal_case
dotnet_naming_symbols.constant_fields.applicable_kinds = field
dotnet_naming_symbols.constant_fields.required_modifiers = const
dotnet_naming_rule.constant_fields.severity = warning
dotnet_naming_rule.constant_fields.symbols = constant_fields
dotnet_naming_rule.constant_fields.style = pascal_case
dotnet_naming_style.camel_case.capitalization = camel_case
dotnet_naming_symbols.other_fields_parameters_and_locals.applicable_kinds = field, parameter, local
dotnet_naming_rule.other_fields_parameters_and_locals.severity = warning
dotnet_naming_rule.other_fields_parameters_and_locals.symbols = other_fields_parameters_and_locals
dotnet_naming_rule.other_fields_parameters_and_locals.style = camel_case
# .NET diagnostic configuration
# CS8509: The switch expression does not handle all possible inputs (it is not exhaustive).
dotnet_diagnostic.CS8509.severity = silent
# CS8524: The switch expression does not handle some values of its input type (it is not exhaustive) involving an unnamed enum value.
dotnet_diagnostic.CS8524.severity = silent
# IDE0005: Using directive is unnecessary.
dotnet_diagnostic.IDE0005.severity = warning
# CA1304: Specify CultureInfo
dotnet_diagnostic.CA1304.severity = warning
# CA1305: Specify IFormatProvider
dotnet_diagnostic.CA1305.severity = warning
# CA1310: Specify StringComparison for correctness
dotnet_diagnostic.CA1310.severity = warning
# CA1825: Avoid zero-length array allocations
dotnet_diagnostic.CA1825.severity = warning
# CA2016: Forward the 'CancellationToken' parameter to methods that take one
dotnet_diagnostic.CA2016.severity = warning
# CA2208: Instantiate argument exceptions correctly
dotnet_diagnostic.CA2208.severity = warning
# CA2211: Non-constant fields should not be visible
dotnet_diagnostic.CA2211.severity = warning
# CA2219: Do not raise exceptions in finally clauses
dotnet_diagnostic.CA2219.severity = warning
# CA2231: Overload operator equals on overriding value type Equals
dotnet_diagnostic.CA2231.severity = warning
# CA1806: Do not ignore method results
dotnet_diagnostic.CA1806.severity = silent
# CA1816: Dispose methods should call SuppressFinalize
dotnet_diagnostic.CA1816.severity = none
# CA1822: Mark members as static
dotnet_diagnostic.CA1822.severity = silent
# CA1826: Do not use Enumerable methods on indexable collections
dotnet_diagnostic.CA1826.severity = silent
# CA1834: Consider using 'StringBuilder.Append(char)' when applicable
dotnet_diagnostic.CA1834.severity = silent
# CA1806: Do not ignore method results
dotnet_diagnostic.CA1806.severity = silent
# CA2245: Do not assign a property to itself
dotnet_diagnostic.CA2245.severity = silent
# CA2201: Do not raise reserved exception types
dotnet_diagnostic.CA2201.severity = warning
# CA1805: Do not initialize unnecessarily
dotnet_diagnostic.CA1805.severity = warning
# CA1725: Parameter names should match base declaration
dotnet_diagnostic.CA1725.severity = warning
# IDE0001: Simplify Names
dotnet_diagnostic.IDE0001.severity = warning
# CA2215: Dispose methods should call base class dispose
dotnet_diagnostic.CA2215.severity = warning
# IDE0059: Unnecessary assignment of a value
dotnet_diagnostic.IDE0059.severity = warning
# CA1031: Do not catch general exception types
dotnet_diagnostic.CA1031.severity = warning
# CA1303: Do not pass literals as localized parameters
dotnet_diagnostic.CA1303.severity = none