forked from webmotions/fake-authentication-jwtbearer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AnalysisRules.ruleset
242 lines (242 loc) · 21.9 KB
/
AnalysisRules.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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="StyleCop rules" Description="Code style rules" ToolsVersion="16.0">
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.SpecialRules">
<Rule Id="SA0002" Action="Error" /> <!-- Invalid settings file -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.SpacingRules">
<Rule Id="SA1000" Action="Error" /> <!-- Keywords should be spaced correctly -->
<Rule Id="SA1001" Action="Error" /> <!-- Commas should be spaced correctly -->
<Rule Id="SA1002" Action="Error" /> <!-- Semicolons should be spaced correctly -->
<Rule Id="SA1003" Action="Error" /> <!-- Symbols should be spaced correctly -->
<Rule Id="SA1004" Action="Error" /> <!-- Documentation lines should begin with single space -->
<Rule Id="SA1005" Action="Error" /> <!-- Single line comments should begin with single space -->
<Rule Id="SA1006" Action="Error" /> <!-- Preprocessor keywords should not be preceded by space -->
<Rule Id="SA1007" Action="Error" /> <!-- Operator keyword should be followed by space -->
<Rule Id="SA1008" Action="Error" /> <!-- Opening parenthesis should be spaced correctly -->
<Rule Id="SA1009" Action="Error" /> <!-- Closing parenthesis should be spaced correctly -->
<Rule Id="SA1010" Action="Error" /> <!-- Opening square brackets should be spaced correctly -->
<Rule Id="SA1011" Action="Error" /> <!-- Closing square brackets should be spaced correctly -->
<Rule Id="SA1012" Action="Error" /> <!-- Opening braces should be spaced correctly -->
<Rule Id="SA1013" Action="Error" /> <!-- Closing braces should be spaced correctly -->
<Rule Id="SA1014" Action="Error" /> <!-- Opening generic brackets should be spaced correctly -->
<Rule Id="SA1015" Action="Error" /> <!-- Closing generic brackets should be spaced correctly -->
<Rule Id="SA1016" Action="Error" /> <!-- Opening attribute brackets should be spaced correctly -->
<Rule Id="SA1017" Action="Error" /> <!-- Closing attribute brackets should be spaced correctly -->
<Rule Id="SA1018" Action="Error" /> <!-- Nullable type symbols should be spaced correctly -->
<Rule Id="SA1019" Action="Error" /> <!-- Member access symbols should be spaced correctly -->
<Rule Id="SA1020" Action="Error" /> <!-- Increment decrement symbols should be spaced correctly -->
<Rule Id="SA1021" Action="Error" /> <!-- Negative signs should be spaced correctly -->
<Rule Id="SA1022" Action="Error" /> <!-- Positive signs should be spaced correctly -->
<Rule Id="SA1023" Action="Error" /> <!-- Dereference and access of symbols should be spaced correctly -->
<Rule Id="SA1024" Action="Error" /> <!-- Colons should be spaced correctly -->
<Rule Id="SA1025" Action="Error" /> <!-- Code should not contain multiple whitespace in a row -->
<Rule Id="SA1026" Action="Error" /> <!-- Code should not contain space after new or stackalloc keyword in implicitly typed array allocation -->
<!--
Tabs should not be used within C# code, because the length of the tab character can vary depending upon the editor
being used to view the code. This can cause the spacing and indexing of the code to vary from the developer's
original intention, and can in some cases make the code difficult to read.
For these reasons, tabs should not be used, and each level of indentation should consist of four spaces.
This will ensure that the code looks the same no matter which editor is being used to view the code.
-->
<Rule Id="SA1027" Action="Error" /> <!-- Use tabs correctly -->
<Rule Id="SA1028" Action="Error" /> <!-- Code should not contain trailing whitespace -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.ReadabilityRules">
<Rule Id="SA1100" Action="Error" /> <!-- Do not prefix calls with base unless local implementation exists -->
<Rule Id="SA1101" Action="None" /> <!-- Prefix local calls with this -->
<Rule Id="SA1102" Action="Error" /> <!-- Query clause should follow previous clause -->
<!-- DISCUSS -->
<Rule Id="SA1103" Action="Warning" /> <!-- Query clauses should be on separate lines or all on one line -->
<Rule Id="SA1104" Action="Warning" /> <!-- Query clause should begin on new line when previous clause spans multiple lines -->
<Rule Id="SA1105" Action="Warning" /> <!-- Query clauses spanning multiple lines should begin on own line -->
<!-- END DISCUSS -->
<Rule Id="SA1106" Action="Error" /> <!-- Code should not contain empty statements (when the code contain an extra semicolon) -->
<Rule Id="SA1107" Action="Error" /> <!-- Code should not contain multiple statements on one line -->
<Rule Id="SA1108" Action="Error" /> <!-- Block statements should not contain embedded comments -->
<Rule Id="SA1110" Action="Error" /> <!-- Opening parenthesis or bracket should be on declaration line -->
<Rule Id="SA1111" Action="Error" /> <!-- Closing parenthesis should be on line of last parameter -->
<Rule Id="SA1112" Action="Error" /> <!-- Closing parenthesis should be on line of opening parenthesis -->
<Rule Id="SA1113" Action="Error" /> <!-- Comma should be on the same line as previous parameter -->
<Rule Id="SA1114" Action="Error" /> <!-- Parameter list should follow declaration -->
<Rule Id="SA1115" Action="Error" /> <!-- Parameter should follow comma -->
<!-- DISCUSS -->
<Rule Id="SA1116" Action="Error" /> <!-- Split parameters should start on line after declaration -->
<Rule Id="SA1117" Action="Error" /> <!-- Parameters should be on same line or separate lines -->
<!-- END DISCUSS -->
<Rule Id="SA1118" Action="Error" /> <!-- Parameter should not span multiple lines -->
<Rule Id="SA1120" Action="Error" /> <!-- Comments should contain text -->
<Rule Id="SA1121" Action="Error" /> <!-- Use built-in type alias -->
<!-- DISCUSS -->
<Rule Id="SA1122" Action="Error" /> <!-- Use string.Empty for empty strings -->
<!-- END DISCUSS -->
<Rule Id="SA1123" Action="Warning" /> <!-- Do not place regions within elements -->
<Rule Id="SA1124" Action="Warning" /> <!-- Do not use regions -->
<Rule Id="SA1125" Action="Error" /> <!-- Use shorthand for nullable types -->
<Rule Id="SA1127" Action="Info" /> <!-- Generic type constraints should be on their own line -->
<Rule Id="SA1128" Action="Info" /> <!-- Put constructor initializers on their own line -->
<!-- DISCUSS / Tweak over time -->
<Rule Id="SA1129" Action="Info" /> <!-- Do not use default value type constructor -->
<!-- END DISCUSS / Tweak over time -->
<Rule Id="SA1130" Action="Error" /> <!-- Use lambda syntax -->
<Rule Id="SA1131" Action="Error" /> <!-- Use readable conditions -->
<Rule Id="SA1132" Action="Error" /> <!-- Do not combine fields -->
<Rule Id="SA1133" Action="Error" /> <!-- Do not combine attributes -->
<Rule Id="SA1134" Action="Error" /> <!-- Attributes should not share line -->
<!-- DISCUSS -->
<Rule Id="SA1135" Action="Info" /> <!-- Using directives should be qualified -->
<!-- END DISCUSS -->
<Rule Id="SA1136" Action="Error" /> <!-- Enum values should be on separate lines -->
<Rule Id="SA1137" Action="Error" /> <!-- Elements should have the same indentation -->
<Rule Id="SA1139" Action="Info" /> <!-- Use literal suffix notation instead of casting -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.OrderingRules">
<Rule Id="SA1200" Action="None" /> <!-- Using directives should be placed correctly -->
<Rule Id="SA1201" Action="None" /> <!-- Elements should appear in the correct order -->
<Rule Id="SA1202" Action="Warning" /> <!-- Elements should be ordered by access -->
<Rule Id="SA1203" Action="Error" /> <!-- Constants should appear before fields -->
<Rule Id="SA1204" Action="Error" /> <!-- Static elements should appear before instance elements -->
<Rule Id="SA1205" Action="Error" /> <!-- Partial elements should declare access -->
<Rule Id="SA1206" Action="Error" /> <!-- Declaration keywords should follow order -->
<Rule Id="SA1207" Action="Error" /> <!-- Protected should come before internal -->
<!-- DISCUSS -->
<Rule Id="SA1208" Action="Warning" /> <!-- System using directives should be placed before other using directives -->
<!-- END DISCUSS -->
<Rule Id="SA1209" Action="Error" /> <!-- Using alias directives should be placed after other using directives -->
<!-- The System namespaces are an exception to this rule and will always precede all other namespaces -->
<Rule Id="SA1210" Action="Error" /> <!-- Using directives should be ordered alphabetically by namespace -->
<Rule Id="SA1211" Action="Error" /> <!-- Using alias directives should be ordered alphabetically by alias name -->
<Rule Id="SA1212" Action="Error" /> <!-- Property accessors should follow order -->
<Rule Id="SA1213" Action="Error" /> <!-- Event accessors should follow order -->
<Rule Id="SA1214" Action="Error" /> <!-- Readonly fields should appear before non-readonly fields -->
<Rule Id="SA1216" Action="Error" /> <!-- Using static directives should be placed at the correct location -->
<Rule Id="SA1217" Action="Error" /> <!-- Using static directives should be ordered alphabetically -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.NamingRules">
<Rule Id="SA1300" Action="Error" /> <!-- Element should begin with upper-case letter -->
<Rule Id="SA1302" Action="Error" /> <!-- Interface names should begin with I -->
<Rule Id="SA1303" Action="Info" /> <!-- Const field names should begin with upper-case letter -->
<Rule Id="SA1304" Action="Error" /> <!-- Non-private readonly fields should begin with upper-case letter -->
<Rule Id="SA1306" Action="Error" /> <!-- Field names should begin with lower-case letter -->
<Rule Id="SA1308" Action="Error" /> <!-- Variable names should not be prefixed -->
<Rule Id="SA1309" Action="None" /> <!-- Field names should not begin with underscore -->
<Rule Id="SA1310" Action="None" /> <!-- Field names should not contain underscore -->
<!-- DISCUSS / Review with usage -->
<Rule Id="SA1311" Action="Info" /> <!-- Static readonly fields should begin with upper-case letter -->
<!-- END DISCUSS -->
<Rule Id="SA1312" Action="Error" /> <!-- Variable names should begin with lower-case letter -->
<Rule Id="SA1313" Action="Error" /> <!-- Parameter names should begin with lower-case letter -->
<Rule Id="SA1314" Action="Error" /> <!-- Type parameter names should begin with T -->
<Rule Id="SX1101" Action="Error" /> <!-- Do not prefix local calls with 'this.' -->
<Rule Id="SX1309" Action="Error" /> <!-- Field names should begin with underscore -->
<Rule Id="SX1309S" Action="None" /> <!-- Static field names should begin with underscore -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.MaintainabilityRules">
<!-- DISCUSS / Review with usage -->
<Rule Id="SA1119" Action="Warning" /> <!-- Statement should not use unnecessary parenthesis -->
<!-- END DISCUSS -->
<Rule Id="SA1400" Action="Error" /> <!-- Access modifier should be declared -->
<Rule Id="SA1401" Action="Error" /> <!-- Fields should be private -->
<Rule Id="SA1402" Action="Error" /> <!-- File may only contain a single type -->
<Rule Id="SA1403" Action="Error" /> <!-- File may only contain a single namespace -->
<Rule Id="SA1404" Action="Error" /> <!-- Code analysis suppression should have justification -->
<!-- DISCUSS / Review with usage -->
<Rule Id="SA1405" Action="Warning" /> <!-- Debug.Assert should provide message text -->
<Rule Id="SA1406" Action="Warning" /> <!-- Debug.Fail should provide message text -->
<!-- END DISCUSS -->
<Rule Id="SA1407" Action="Error" /> <!-- Arithmetic expressions should declare precedence -->
<Rule Id="SA1408" Action="Error" /> <!-- Conditional expressions should declare precedence -->
<Rule Id="SA1409" Action="Error" /> <!-- Remove unnecessary code -->
<Rule Id="SA1410" Action="Error" /> <!-- Remove delegate parenthesis when possible -->
<Rule Id="SA1411" Action="Error" /> <!-- Attribute constructor should not use unnecessary parenthesis -->
<!-- DISCUSS / Review with usage -->
<Rule Id="SA1412" Action="None" /> <!-- Store files as UTF-8 with byte order mark -->
<!-- END DISCUSS -->
<Rule Id="SA1413" Action="None" /> <!-- Use trailing comma in multi-line initializers -->
<!-- DISCUSS -->
<Rule Id="SA1414" Action="Info" /> <!-- Tuple types in signatures should have element names -->
<!-- END DISCUSS -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers.LayoutRules">
<Rule Id="SA1500" Action="Error" /> <!-- Braces for multi-line statements should not share line -->
<Rule Id="SA1501" Action="Error" /> <!-- Statement should not be on a single line -->
<Rule Id="SA1502" Action="Error" /> <!-- Element should not be on a single line -->
<!-- DISCUSS -->
<Rule Id="SA1503" Action="Info" /> <!-- Braces should not be omitted -->
<!-- END DISCUSS -->
<Rule Id="SA1504" Action="Error" /> <!-- All accessors should be single-line or multi-line -->
<Rule Id="SA1505" Action="Error" /> <!-- Opening braces should not be followed by blank line -->
<Rule Id="SA1506" Action="Error" /> <!-- Element documentation headers should not be followed by blank line -->
<Rule Id="SA1507" Action="Error" /> <!-- Code should not contain multiple blank lines in a row -->
<Rule Id="SA1508" Action="Error" /> <!-- Closing braces should not be preceded by blank line -->
<Rule Id="SA1509" Action="Error" /> <!-- Opening braces should not be preceded by blank line -->
<Rule Id="SA1510" Action="Error" /> <!-- Chained statement blocks should not be preceded by blank line -->
<Rule Id="SA1511" Action="Error" /> <!-- While-do footer should not be preceded by blank line -->
<Rule Id="SA1512" Action="Error" /> <!-- Single-line comments should not be followed by blank line -->
<Rule Id="SA1513" Action="Error" /> <!-- Closing brace should be followed by blank line -->
<Rule Id="SA1514" Action="Error" /> <!-- Element documentation header should be preceded by blank line -->
<Rule Id="SA1515" Action="Error" /> <!-- Single-line comment should be preceded by blank line -->
<Rule Id="SA1516" Action="Error" /> <!-- Elements should be separated by blank line -->
<Rule Id="SA1517" Action="Error" /> <!-- Code should not contain blank lines at start of file -->
<!-- Follows stylecop settings: layoutRules -> newlineAtEndOfFile -->
<Rule Id="SA1518" Action="Error" /> <!-- Use line endings correctly at end of file -->
<Rule Id="SA1519" Action="Error" /> <!-- Braces should not be omitted from multi-line child statement -->
<!-- DISCUSS -->
<Rule Id="SA1520" Action="Warning" /> <!-- Use braces consistently -->
<!-- END DISCUSS -->
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.CSharp.DocumentationRules">
<!-- TODO EVENTUALLY - Setting to none for no warning of info in code -->
<Rule Id="SA1600" Action="None" /> <!-- Elements should be documented -->
<Rule Id="SA1601" Action="None" /> <!-- Partial elements should be documented -->
<Rule Id="SA1602" Action="None" /> <!-- Enumeration items should be documented -->
<Rule Id="SA1603" Action="None" /> <!-- Documentation should contain valid XML -->
<Rule Id="SA1604" Action="None" /> <!-- Element documentation should have summary -->
<Rule Id="SA1605" Action="None" /> <!-- Partial element documentation should have summary -->
<Rule Id="SA1606" Action="None" /> <!-- Element documentation should have summary text -->
<Rule Id="SA1607" Action="None" /> <!-- Partial element documentation should have summary text -->
<Rule Id="SA1608" Action="None" /> <!-- Element documentation should not have default summary -->
<Rule Id="SA1609" Action="None" /> <!-- Property documentation should have value -->
<Rule Id="SA1610" Action="None" /> <!-- Property documentation should have value text -->
<Rule Id="SA1611" Action="None" /> <!-- Element parameters should be documented -->
<Rule Id="SA1612" Action="None" /> <!-- Element parameter documentation should match element parameters -->
<Rule Id="SA1613" Action="None" /> <!-- Element parameter documentation should declare parameter name -->
<Rule Id="SA1614" Action="None" /> <!-- Element parameter documentation should have text -->
<Rule Id="SA1615" Action="None" /> <!-- Element return value should be documented -->
<Rule Id="SA1616" Action="None" /> <!-- Element return value documentation should have text -->
<Rule Id="SA1617" Action="None" /> <!-- Void return value should not be documented -->
<Rule Id="SA1618" Action="None" /> <!-- Generic type parameters should be documented -->
<Rule Id="SA1619" Action="None" /> <!-- Generic type parameters should be documented partial class -->
<Rule Id="SA1620" Action="None" /> <!-- Generic type parameter documentation should match type parameters -->
<Rule Id="SA1621" Action="None" /> <!-- Generic type parameter documentation should declare parameter name -->
<Rule Id="SA1622" Action="None" /> <!-- Generic type parameter documentation should have text -->
<Rule Id="SA1623" Action="None" /> <!-- Property summary documentation should match accessors -->
<Rule Id="SA1624" Action="None" /> <!-- Property summary documentation should omit accessor with restricted access -->
<Rule Id="SA1625" Action="None" /> <!-- Element documentation should not be copied and pasted -->
<Rule Id="SA1626" Action="None" /> <!-- Single-line comments should not use documentation style slashes -->
<Rule Id="SA1627" Action="None" /> <!-- Documentation text should not be empty -->
<Rule Id="SA1628" Action="None" /> <!-- Documentation text should begin with a capital letter -->
<Rule Id="SA1629" Action="None" /> <!-- Documentation text should end with a period -->
<Rule Id="SA1630" Action="None" /> <!-- Documentation text should contain whitespace -->
<Rule Id="SA1631" Action="None" /> <!-- Documentation should meet character percentage -->
<Rule Id="SA1632" Action="None" /> <!-- Documentation text should meet minimum character length -->
<Rule Id="SA1633" Action="None" /> <!-- File should have header -->
<Rule Id="SA1634" Action="None" /> <!-- File header should show copyright -->
<Rule Id="SA1635" Action="None" /> <!-- File header should have copyright text -->
<Rule Id="SA1636" Action="None" /> <!-- File header copyright text should match -->
<Rule Id="SA1637" Action="None" /> <!-- File header should contain file name -->
<Rule Id="SA1638" Action="None" /> <!-- File header file name documentation should match file name -->
<Rule Id="SA1639" Action="None" /> <!-- File header should have summary -->
<Rule Id="SA1640" Action="None" /> <!-- File header should have valid company text -->
<Rule Id="SA1641" Action="None" /> <!-- File header company name text should match -->
<Rule Id="SA1642" Action="None" /> <!-- Constructor summary documentation should begin with standard text -->
<Rule Id="SA1643" Action="None" /> <!-- Destructor summary documentation should begin with standard text -->
<Rule Id="SA1644" Action="None" /> <!-- Documentation headers should not contain blank lines -->
<Rule Id="SA1645" Action="None" /> <!-- Included documentation file does not exist -->
<Rule Id="SA1646" Action="None" /> <!-- Included documentation XPath does not exist -->
<Rule Id="SA1647" Action="None" /> <!-- Include node does not contain valid file and path -->
<Rule Id="SA1648" Action="None" /> <!-- Inheritdoc should be used with inheriting class -->
<Rule Id="SA1649" Action="None" /> <!-- File name should match first type name -->
<Rule Id="SA1650" Action="None" /> <!-- Element documentation should be spelled correctly -->
<Rule Id="SA1651" Action="None" /> <!-- Do not use placeholder elements -->
</Rules>
</RuleSet>