-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMinimumRecommendedRulesWithStyleCop.ruleset
207 lines (207 loc) · 9.57 KB
/
MinimumRecommendedRulesWithStyleCop.ruleset
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
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Recommended Rules for FxCop and StyleCop" Description="Recommended Rules for FxCop and StyleCop" ToolsVersion="15.0">
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA2208" Action="None" />
<Rule Id="CA1001" Action="None" />
<Rule Id="CA1009" Action="Warning" />
<Rule Id="CA1010" Action="None" />
<Rule Id="CA1016" Action="Warning" />
<Rule Id="CA1031" Action="None" />
<!-- Do not catch general exception types -->
<Rule Id="CA1033" Action="Warning" />
<Rule Id="CA1049" Action="Warning" />
<Rule Id="CA1054" Action="None" />
<!-- Uri parameters should not be strings -->
<Rule Id="CA1056" Action="None" />
<Rule Id="CA1060" Action="Warning" />
<Rule Id="CA1061" Action="Warning" />
<Rule Id="CA1062" Action="None" />
<Rule Id="CA1063" Action="Warning" />
<Rule Id="CA1065" Action="Warning" />
<Rule Id="CA1301" Action="Warning" />
<Rule Id="CA1304" Action="None" />
<!--Do not need CultureInfo for string ToLower-->
<Rule Id="CA1308" Action="None" />
<!--Do not force field names must not contain underscore-->
<Rule Id="SA1310" Action="None" />
<!-- Replace the call to 'ToLowerInvariant' with 'ToUpperInvariant' -->
<Rule Id="CA1400" Action="Warning" />
<Rule Id="CA1401" Action="Warning" />
<Rule Id="CA1403" Action="Warning" />
<Rule Id="CA1404" Action="Warning" />
<Rule Id="CA1405" Action="Warning" />
<Rule Id="CA1410" Action="Warning" />
<Rule Id="CA1415" Action="Warning" />
<Rule Id="CA1704" Action="Error" />
<Rule Id="CA1707" Action="None" />
<Rule Id="CA1720" Action="None" />
<Rule Id="CA1724" Action="None" />
<Rule Id="CA1801" Action="None" />
<Rule Id="CA1819" Action="None" />
<Rule Id="CA1821" Action="Warning" />
<Rule Id="CA1822" Action="None" />
<!-- Mark members as static, Controller actions have to be instance members -->
<Rule Id="CA1900" Action="Warning" />
<Rule Id="CA1901" Action="Warning" />
<Rule Id="CA2000" Action="None" />
<Rule Id="CA2002" Action="Warning" />
<Rule Id="CA2007" Action="None" />
<!-- Do not directly await a Task, ASP.NET Core does not have sync context -->
<Rule Id="CA2100" Action="Warning" />
<Rule Id="CA2101" Action="Warning" />
<Rule Id="CA2108" Action="Warning" />
<Rule Id="CA2111" Action="Warning" />
<Rule Id="CA2112" Action="Warning" />
<Rule Id="CA2114" Action="Warning" />
<Rule Id="CA2116" Action="Warning" />
<Rule Id="CA2117" Action="Warning" />
<Rule Id="CA2122" Action="Warning" />
<Rule Id="CA2123" Action="Warning" />
<Rule Id="CA2124" Action="Warning" />
<Rule Id="CA2126" Action="Warning" />
<Rule Id="CA2131" Action="Warning" />
<Rule Id="CA2132" Action="Warning" />
<Rule Id="CA2133" Action="Warning" />
<Rule Id="CA2134" Action="Warning" />
<Rule Id="CA2137" Action="Warning" />
<Rule Id="CA2138" Action="Warning" />
<Rule Id="CA2140" Action="Warning" />
<Rule Id="CA2141" Action="Warning" />
<Rule Id="CA2146" Action="Warning" />
<Rule Id="CA2147" Action="Warning" />
<Rule Id="CA2149" Action="Warning" />
<Rule Id="CA2200" Action="Warning" />
<Rule Id="CA2202" Action="Warning" />
<Rule Id="CA2207" Action="Warning" />
<Rule Id="CA2212" Action="Warning" />
<Rule Id="CA2213" Action="Warning" />
<Rule Id="CA2214" Action="Warning" />
<Rule Id="CA2216" Action="Warning" />
<Rule Id="CA2220" Action="Warning" />
<Rule Id="CA2229" Action="Warning" />
<Rule Id="CA2231" Action="Warning" />
<Rule Id="CA2232" Action="Warning" />
<Rule Id="CA2235" Action="Warning" />
<Rule Id="CA2236" Action="Warning" />
<Rule Id="CA2237" Action="Warning" />
<Rule Id="CA2238" Action="Warning" />
<Rule Id="CA2240" Action="Warning" />
<Rule Id="CA2241" Action="Warning" />
<Rule Id="CA2242" Action="Warning" />
<Rule Id="CA2227" Action="None" />
<Rule Id="CS1998" Action="None" />
<Rule Id="CA1303" Action="None" />
<Rule Id="CA1305" Action="None" />
<Rule Id="CA1307" Action="None" />
<Rule Id="CA1710" Action="None" />
<Rule Id="CA1716" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA0001" Action="None" />
<!-- Elements should be documented -->
<Rule Id="SA1005" Action="None" />
<Rule Id="SA1611" Action="None" />
<Rule Id="SA1615" Action="None" />
<!-- Single line comment should begin with a space -->
<Rule Id="SA1600" Action="None" />
<!-- Elements should be documented -->
<Rule Id="SA1627" Action="None" />
<!-- Documentation text must not be empty -->
<Rule Id="SA1629" Action="None" />
<!-- Documentation text must end with a period -->
<Rule Id="SA1633" Action="None" />
<!-- File should have header -->
<Rule Id="SA1101" Action="None" />
<!-- Prefix local calls with this -->
<Rule Id="SA1407" Action="None" />
<!-- Arithmetic expressions should declare precedence -->
<Rule Id="SA1116" Action="None" />
<!-- Split parameters should start on line after declaration -->
<Rule Id="SA1309" Action="None" />
<!-- Field names should not begin with underscore -->
<Rule Id="SA1402" Action="None" />
<!-- File may only contain a single type -->
<Rule Id="SA1204" Action="None" />
<!-- Static elements should appear before instance elements -->
<Rule Id="SA1604" Action="None" />
<!-- Element documentation should have summary -->
<Rule Id="SA1516" Action="None" />
<!-- Elements should be separated by blank line -->
<Rule Id="SA1649" Action="None" />
<!-- File name should match first type name -->
<Rule Id="SA1128" Action="None" />
<!-- Put constructor initializers on their own line -->
<Rule Id="SA1122" Action="None" />
<!-- Use string.Empty for empty strings -->
<Rule Id="SA1413" Action="None" />
<!-- Use trailing comma in multi-line initializers -->
<Rule Id="SA1117" Action="None" />
<!-- Parameters should be on same line or separate lines -->
<Rule Id="SA1602" Action="None" />
<!-- Enumeration items should be documented -->
<Rule Id="SA1108" Action="None" />
<!-- Block statements should not contain embedded comments -->
<Rule Id="SA1601" Action="None" />
<!-- Partial elements should be documented -->
<Rule Id="SA1401" Action="None" />
<!-- Fields should be private -->
<Rule Id="SA1404" Action="None" />
<!-- Code analysis suppression should have justification -->
<Rule Id="SA1515" Action="None" />
<!-- Single-line comment should be preceded by blank line -->
<Rule Id="SA1512" Action="None" />
<!-- Single-line comments should not be followed by blank line -->
<Rule Id="SA1118" Action="None" />
<!-- Parameter should not span multiple lines -->
<Rule Id="SA1127" Action="None" />
<!-- Generic type constraints should be on their own line -->
<Rule Id="SA1132" Action="None" />
<!-- Do not combine fields -->
<Rule Id="SA1501" Action="None" />
<!-- Statement should not be on a single line -->
<Rule Id="SA1502" Action="None" />
<!-- Element should not be on a single line -->
<Rule Id="SA1203" Action="None" />
<!-- Constants should appear before fields -->
<Rule Id="SA1214" Action="None" />
<!-- Readonly fields should appear before non-readonly fields -->
<Rule Id="SA1133" Action="None" />
<!-- Do not combine attributes -->
<Rule Id="SA1202" Action="None" />
<!-- Elements should be ordered by access -->
<Rule Id="SA1201" Action="None" />
<!-- Elements should appear in the correct order -->
<Rule Id="SA1200" Action="None" />
<!-- A C# using directive is placed outside of a namespace element. -->
<Rule Id="SA1623" Action="None" />
<!-- The documentation text within a C# property's <summary> tag does not match the accessors within the property. -->
<Rule Id="SA1634" Action="None" />
<!-- The file header at the top of a C# code file is missing a copyright tag. -->
<Rule Id="SA1635" Action="None" />
<!-- The file header at the top of a C# code file is missing copyright text. -->
<Rule Id="SA1636" Action="None" />
<!-- The file header at the top of a C# code file does not contain the appropriate copyright text. -->
<Rule Id="SA1637" Action="None" />
<!-- The file header at the top of a C# code file is missing the file name. -->
<Rule Id="SA1638" Action="None" />
<!-- The file tag within the file header at the top of a C# code file does not contain the name of the file. -->
<Rule Id="SA1640" Action="None" />
<!-- The file header at the top of a C# code file does not contain company name text. -->
<Rule Id="SA1641" Action="None" />
<!-- The file header at the top of a C# code file does not contain the appropriate company name text. -->
<Rule Id="S2583" Action="None" />
<!-- Change this condition so that it does not always evaluate to 'false'; some subsequent code is never executed. -->
<Rule Id="S125" Action="None" />
<Rule Id="S2699" Action="None" />
<Rule Id="S3400" Action="None" />
<!-- operator== should not be overloaded on reference types -->
<Rule Id="S3875" Action="None" />
<Rule Id="S3925" Action="None" />
<Rule Id="S3928" Action="None" />
<Rule Id="S4457" Action="None" />
<!-- Parameter validation in "async"/"await" methods should be wrapped -->
<Rule Id="CS0618" Action="None" />
<!-- URIs should not be hardcoded -->
<Rule Id="S1075" Action="None" />
</Rules>
</RuleSet>