-
Notifications
You must be signed in to change notification settings - Fork 409
/
Copy path.editorconfig
136 lines (129 loc) · 5.54 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
root = true
[*]
indent_style = tab
[*.yml]
indent_style = space
[*.cs]
csharp_new_line_before_open_brace = all
csharp_new_line_before_else = true
csharp_new_line_before_catch = true
csharp_new_line_before_finally = true
csharp_space_after_cast = true
csharp_indent_switch_labels = true
csharp_indent_case_contents = true
csharp_indent_labels = one_less_than_current
# Style rules
# Can't be in .globalconfig because dotnet format doesn't respect that https://github.com/dotnet/format/issues/1643
# Remove `this` or `Me` qualification
dotnet_diagnostic.IDE0003.severity = silent
# Remove unnecessary cast
dotnet_diagnostic.IDE0004.severity = warning
# Remove unnecessary import
dotnet_diagnostic.IDE0005.severity = warning
# Use var instead of explicit type
dotnet_diagnostic.IDE0007.severity = suggestion
# Use explicit type instead of var
dotnet_diagnostic.IDE0008.severity = silent
# Add `this` or `Me` qualification
dotnet_diagnostic.IDE0009.severity = silent
# Inline variable declaration
dotnet_diagnostic.IDE0018.severity = warning
# Use pattern matching to avoid as followed by a null check
dotnet_diagnostic.IDE0019.severity = warning
# Use pattern matching to avoid is check followed by a cast (with variable)
dotnet_diagnostic.IDE0020.severity = warning
# Use expression body for constructors
dotnet_diagnostic.IDE0021.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
# Use expression body for methods
dotnet_diagnostic.IDE0022.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
# Use expression body for conversion operators
dotnet_diagnostic.IDE0023.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
# Use expression body for operators
dotnet_diagnostic.IDE0024.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
# Use expression body for properties
dotnet_diagnostic.IDE0025.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
# Use expression body for indexers
dotnet_diagnostic.IDE0026.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
# Use expression body for accessors
dotnet_diagnostic.IDE0027.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
# Null check can be simplified
dotnet_diagnostic.IDE0029.severity = warning
# Null check can be simplified
dotnet_diagnostic.IDE0030.severity = warning
# Use null propagation
dotnet_diagnostic.IDE0031.severity = warning
# Use auto property
dotnet_diagnostic.IDE0032.severity = suggestion
# Simplify default expression
dotnet_diagnostic.IDE0034.severity = suggestion
# Use pattern matching to avoid is check followed by a cast (without variable)
dotnet_diagnostic.IDE0038.severity = warning
# Use is null check
dotnet_diagnostic.IDE0041.severity = warning
# Deconstruct variable declaration
dotnet_diagnostic.IDE0042.severity = suggestion
# dotnet_diagnostic.IDE0049.severity = error # see SA1121
# Remove unused private member
dotnet_diagnostic.IDE0051.severity = suggestion
# Remove unread private member
dotnet_diagnostic.IDE0052.severity = silent # TODO: should be warning imo, but there's too much violation currently
# Use compound assignment
dotnet_diagnostic.IDE0054.severity = warning
# Use index operator
dotnet_diagnostic.IDE0056.severity = suggestion
# Use range operator
dotnet_diagnostic.IDE0057.severity = suggestion
# Use expression body for local functions
dotnet_diagnostic.IDE0061.severity = silent # UseExpressionBodyDiagnosticAnalyzer very slow
# Use simple using statement
dotnet_diagnostic.IDE0063.severity = suggestion
# Make struct fields writable
dotnet_diagnostic.IDE0064.severity = error
# using directive placement
dotnet_diagnostic.IDE0065.severity = error
# Use switch expression
dotnet_diagnostic.IDE0066.severity = suggestion
# Use System.HashCode.Combine
dotnet_diagnostic.IDE0070.severity = warning
# Simplify interpolation
dotnet_diagnostic.IDE0071.severity = suggestion
# Use coalesce compound assignment
dotnet_diagnostic.IDE0074.severity = suggestion
# Use pattern matching
dotnet_diagnostic.IDE0078.severity = suggestion
# Convert typeof to nameof
dotnet_diagnostic.IDE0082.severity = warning
# Use pattern matching (not operator)
dotnet_diagnostic.IDE0083.severity = warning
# Simplify new expression
dotnet_diagnostic.IDE0090.severity = suggestion
# Remove unnecessary equality operator
dotnet_diagnostic.IDE0100.severity = warning
# Remove unnecessary discard
dotnet_diagnostic.IDE0110.severity = warning
# Simplify LINQ expression
dotnet_diagnostic.IDE0120.severity = error
# Namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = silent # should be warning imo
# Use tuple to swap values
dotnet_diagnostic.IDE0180.severity = suggestion
# Use UTF-8 string literal
dotnet_diagnostic.IDE0230.severity = warning
# Nullable directive is redundant
dotnet_diagnostic.IDE0240.severity = warning
# Nullable directive is unnecessary
dotnet_diagnostic.IDE0241.severity = warning
# Struct can be made 'readonly'
dotnet_diagnostic.IDE0250.severity = suggestion
# Use pattern matching
dotnet_diagnostic.IDE0260.severity = suggestion
# Use nameof
dotnet_diagnostic.IDE0280.severity = error
# Collection initialization can be simplified
dotnet_diagnostic.IDE0305.severity = silent
csharp_style_var_when_type_is_apparent = true
csharp_style_var_elsewhere = true
csharp_style_expression_bodied_methods = when_on_single_line
csharp_style_expression_bodied_properties = when_on_single_line
csharp_style_expression_bodied_indexers = when_on_single_line
csharp_style_expression_bodied_accessors = when_on_single_line