-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStyleCop.ruleset
More file actions
173 lines (173 loc) · 12.9 KB
/
StyleCop.ruleset
File metadata and controls
173 lines (173 loc) · 12.9 KB
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
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Microsoft Managed Recommended Rules" Description="These rules focus on the most critical problems in your code, including potential security holes, application crashes, and other important logic and design errors. It is recommended to include this rule set in any custom rule set you create for your projects." ToolsVersion="10.0">
<Localization ResourceAssembly="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.dll" ResourceBaseName="Microsoft.VisualStudio.CodeAnalysis.RuleSets.Strings.Localized">
<Name Resource="MinimumRecommendedRules_Name" />
<Description Resource="MinimumRecommendedRules_Description" />
</Localization>
<Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
<Rule Id="CA1001" Action="Warning" />
<Rule Id="CA1009" Action="Warning" />
<Rule Id="CA1016" Action="Warning" />
<Rule Id="CA1033" Action="Warning" />
<Rule Id="CA1049" Action="Warning" />
<Rule Id="CA1060" Action="Warning" />
<Rule Id="CA1061" Action="Warning" />
<Rule Id="CA1063" Action="Warning" />
<Rule Id="CA1065" Action="Warning" />
<Rule Id="CA1301" Action="Warning" />
<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="CA1821" Action="Warning" />
<Rule Id="CA1900" Action="Warning" />
<Rule Id="CA1901" Action="Warning" />
<Rule Id="CA2002" Action="Warning" />
<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" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<Rule Id="SA1600" Action="Error" /> <!-- Elements should be documented -->
<Rule Id="SA1633" Action="Error" /> <!-- File should have header -->
<Rule Id="SA0001" Action="Error" /> <!-- XML comments -->
<Rule Id="SA1101" Action="Error" /> <!-- Prefix local calls with this -->
<Rule Id="SA1407" Action="Error" /> <!-- Arithmetic expressions should declare precedence -->
<Rule Id="SA1116" Action="Error" /> <!-- Split parameters should start on line after declaration -->
<Rule Id="SA1309" Action="Error" /> <!-- Field names should not begin with underscore -->
<Rule Id="SA1402" Action="Error" /> <!-- File may only contain a single type -->
<Rule Id="SA1204" Action="Error" /> <!-- Static elements should appear before instance elements -->
<Rule Id="SA1604" Action="Error" /> <!-- Element documentation should have summary -->
<Rule Id="SA1516" Action="Error" /> <!-- Elements should be separated by blank line -->
<Rule Id="SA1649" Action="Error" /> <!-- File name should match first type name -->
<Rule Id="SA1128" Action="Error" /> <!-- Put constructor initializers on their own line -->
<Rule Id="SA1122" Action="Error" /> <!-- Use string.Empty for empty strings -->
<Rule Id="SA1413" Action="Error" /> <!-- Use trailing comma in multi-line initializers -->
<Rule Id="SA1117" Action="Error" /> <!-- Parameters should be on same line or separate lines -->
<Rule Id="SA1602" Action="Error" /> <!-- Enumeration items should be documented -->
<Rule Id="SA1108" Action="Error" /> <!-- Block statements should not contain embedded comments -->
<Rule Id="SA1601" Action="Error" /> <!-- Partial elements should be documented -->
<Rule Id="SA1401" Action="Error" /> <!-- Fields should be private -->
<Rule Id="SA1404" Action="Error" /> <!-- Code analysis suppression should have justification -->
<Rule Id="SA1515" Action="Error" /> <!-- Single-line comment should be preceded by blank line -->
<Rule Id="SA1512" Action="Error" /> <!-- Single-line comments should not be followed by blank line -->
<Rule Id="SA1118" Action="Error" /> <!-- Parameter should not span multiple lines -->
<Rule Id="SA1127" Action="Error" /> <!-- Generic type constraints should be on their own line -->
<Rule Id="SA1132" Action="Error" /> <!-- Do not combine fields -->
<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 -->
<Rule Id="SA1203" Action="Error" /> <!-- Constants should appear before fields -->
<Rule Id="SA1214" Action="Error" /> <!-- Readonly fields should appear before non-readonly fields -->
<Rule Id="SA1133" Action="Error" /> <!-- Do not combine attributes -->
<Rule Id="SA1202" Action="Error" /> <!-- Elements should be ordered by access -->
<Rule Id="SA1201" Action="Error" /> <!-- Elements should appear in the correct order -->
<Rule Id="SA1004" Action="Error" /> <!-- Documentation line should begin with a space. -->
<Rule Id="SA1005" Action="Error" /> <!-- Single line comment should begin with a space. -->
<Rule Id="SA1200" Action="Error" /> <!-- Using directive should appear within a namespace declaration. -->
<Rule Id="SA1028" Action="Error" /> <!-- Code should not contain trailing whitespace. -->
<Rule Id="SA1636" Action="Error" /> <!-- The file header copyright text should match the copyright text from the settings. -->
<Rule Id="SA1208" Action="Error" /> <!-- System using directives must be placed before other using directives. -->
<Rule Id="SA1629" Action="Error" /> <!-- Documentation text should end with a period. -->
<Rule Id="SA1013" Action="Error" /> <!-- Closing brace should be preceded by a space. -->
<Rule Id="SA1000" Action="Error" /> <!-- Keywords must be spaced correctly. -->
<Rule Id="SA1513" Action="Error" /> <!-- Closing brace should be followed by blank line. -->
<Rule Id="SA1500" Action="Error" /> <!-- Braces for multi-line statements should not share line. -->
<Rule Id="SA1507" Action="Error" /> <!-- Code should not contain multiple blank lines in a row. -->
<Rule Id="SA1300" Action="Error" /> <!-- Element should begin with an uppercase letter. -->
<Rule Id="SA1612" Action="Error" /> <!-- The parameter does not exist. -->
<Rule Id="SA1300" Action="Error" /> <!-- Element should begin with an uppercase letter. -->
<Rule Id="SA1508" Action="Error" /> <!-- A closing brace should not be preceded by a blank line. -->
<Rule Id="SA1008" Action="Error" /> <!-- Opening parenthesis should not be preceded by a space. -->
<Rule Id="SA1508" Action="Error" /> <!-- A closing brace should not be preceded by a blank line. -->
<Rule Id="SA1008" Action="Error" /> <!-- Opening parenthesis should not be preceded by a space. -->
<Rule Id="SA1505" Action="Error" /> <!-- An opening brace should not be followed by a blank line. -->
<Rule Id="SA1114" Action="Error" /> <!-- Parameter list should follow declaration. -->
<Rule Id="SA1642" Action="Error" /> <!-- Constructor summary documentation should begin with standard text. -->
<Rule Id="SA1611" Action="Error" /> <!-- The documentation for parameter is missing. -->
<Rule Id="SA1306" Action="Error" /> <!-- Field should begin with lower-case letter. -->
<Rule Id="SA1618" Action="Error" /> <!-- The documentation for type parameter is missing. -->
<Rule Id="SA1638" Action="Error" /> <!-- File header file name documentation should match file name. -->
<Rule Id="SA1124" Action="Error" /> <!-- Do not use regions. -->
<Rule Id="SA1210" Action="Error" /> <!-- Using directives should be ordered alphabetically by the namespaces. -->
<Rule Id="SA1209" Action="Error" /> <!-- Using alias directives should be placed after all using namespace directives. -->
<Rule Id="SA1001" Action="Error" /> <!-- Commas should be followed by whitespace. -->
<Rule Id="SA1024" Action="Error" /> <!-- Colon should be preceded by a space. -->
<Rule Id="SA1003" Action="Error" /> <!-- Operator should be preceded by whitespace. -->
<Rule Id="SA1638" Action="Error" /> <!-- File header file name documentation should match file name. -->
<Rule Id="SA1111" Action="Error" /> <!-- Closing parenthesis should be on line of last parameter. -->
<Rule Id="SA1009" Action="Error" /> <!-- Closing parenthesis should not be preceded by a space. -->
<Rule Id="SA1518" Action="Error" /> <!-- Code should not contain blank lines at the end of the file. -->
<Rule Id="SA1517" Action="Error" /> <!-- Code should not contain blank lines at start of file. -->
<Rule Id="SA1634" Action="Error" /> <!-- The file header should contain a copyright tag. -->
<Rule Id="SA1623" Action="Error" /> <!-- The property's documentation summary text should begin with: 'Gets or sets a value indicating whether'. -->
<Rule Id="SA1014" Action="Error" /> <!-- Opening generic brackets should not be preceded by a space. -->
<Rule Id="SA1615" Action="Error" /> <!-- Element return value should be documented. -->
<Rule Id="SA1119" Action="Error" /> <!-- Statement should not use unnecessary parenthesis. -->
<Rule Id="SA1615" Action="Error" /> <!-- Element return value should be documented. -->
<Rule Id="SA1506" Action="Error" /> <!-- Element documentation headers should not be followed by blank line. -->
<Rule Id="SA1012" Action="Error" /> <!-- Opening brace should be preceded by a space. -->
<Rule Id="SA1002" Action="Error" /> <!-- Semicolons should be followed by a space. -->
<Rule Id="SA1025" Action="Error" /> <!-- Code should not contain multiple whitespace characters in a row. -->
<Rule Id="SA1606" Action="Error" /> <!-- Element documentation should have summary text. -->
<Rule Id="SA1614" Action="Error" /> <!-- Element parameter documentation should have text. -->
<Rule Id="SA1616" Action="Error" /> <!-- Element return value documentation should have text. -->
<Rule Id="SA1503" Action="Error" /> <!-- Braces should not be omitted. -->
<Rule Id="SA1312" Action="Error" /> <!-- Variable should begin with lower-case letter. -->
<Rule Id="SA1625" Action="Error" /> <!-- Element documentation should not be copied and pasted. -->
<Rule Id="SA1400" Action="Error" /> <!-- Element should declare an access modifier. -->
<Rule Id="SA1137" Action="Error" /> <!-- Elements should have the same indentation. -->
<Rule Id="SA1313" Action="Error" /> <!-- Parameter should begin with lower-case letter. -->
<Rule Id="SA1514" Action="Error" /> <!-- Element documentation header should be preceded by blank line. -->
<Rule Id="SA1313" Action="Error" /> <!-- Parameter should begin with lower-case letter. -->
<Rule Id="SA1121" Action="Error" /> <!-- Use built-in type alias. -->
<Rule Id="SA1310" Action="Error" /> <!-- Field should not contain an underscore. -->
<Rule Id="SA1107" Action="Error" /> <!-- Code should not contain multiple statements on one line. -->
<Rule Id="SA1106" Action="Error" /> <!-- Code should not contain empty statements. -->
<Rule Id="SA1510" Action="Error" /> <!-- Statement should not be preceded by a blank line. -->
<Rule Id="SA1136" Action="Error" /> <!-- Enum values should be on separate lines. -->
<Rule Id="SA1307" Action="Error" /> <!-- Field should begin with upper-case letter. -->
<Rule Id="SA1131" Action="Error" /> <!-- Constant values should appear on the right-hand side of comparisons. -->
<Rule Id="SA1314" Action="Error" /> <!-- Type parameter names should begin with T. -->
</Rules>
</RuleSet>