summaryrefslogtreecommitdiff
path: root/src/bindings/mono/ca.ruleset.in
diff options
context:
space:
mode:
authorLauro Moura <lauromoura@expertisesolutions.com.br>2019-12-30 21:42:24 +0000
committerFelipe Magno de Almeida <felipe@expertisesolutions.com.br>2019-12-30 22:17:32 -0300
commite632c1334a123a2793776b0b60c04ebf00fcd7b8 (patch)
tree3d070a2e441c5e6dd0e79278d50622b3a3fe5585 /src/bindings/mono/ca.ruleset.in
parent2af38d11ed58d95f050dc08cc038d6b4aa30ac91 (diff)
csharp: Add StyleCop support to dotnet build
This patch adds support to run the StyleCop rules. To enable, -Ddotnet=true is needed, You can pass -Ddotnet-stylecop=CAXXXX,CAXXYY where X and Y are digits for CAs or SAs. You can also ask that the CAs and SAs cause errors instead of warnings. Differential Revision: https://phab.enlightenment.org/D10969
Diffstat (limited to 'src/bindings/mono/ca.ruleset.in')
-rw-r--r--src/bindings/mono/ca.ruleset.in334
1 files changed, 334 insertions, 0 deletions
diff --git a/src/bindings/mono/ca.ruleset.in b/src/bindings/mono/ca.ruleset.in
new file mode 100644
index 0000000000..0f5be8816c
--- /dev/null
+++ b/src/bindings/mono/ca.ruleset.in
@@ -0,0 +1,334 @@
1<?xml version="1.0" encoding="utf-8"?>
2<RuleSet Name="CustomRulset" Description="Custom Rulset" ToolsVersion="14.0">
3 <Rules AnalyzerId="Microsoft.Analyzers.ManagedCodeAnalysis" RuleNamespace="Microsoft.Rules.Managed">
4 <!-- Do not declare static members on Generic Types -->
5 @CA1000@
6 <!-- Consider making Raise an event -->
7 @CA1030@
8 <!-- Catch generic exception -->
9 @CA1031@
10 <!-- Add extra exception constructors -->
11 @CA1032@
12 <!-- Do not nest NativeTypes -->
13 @CA1034@
14 <!-- IComparable must implement other comparison operators -->
15 @CA1036@
16 <!-- Avoid empty interface -->
17 @CA1040@
18 <!-- Use Integral Or String Argument For Indexers -->
19 @CA1043@
20 <!-- Consider making property with getter -->
21 @CA1044@
22 <!-- Visible instance fields -->
23 @CA1051@
24 <!-- Static holder can be static -->
25 @CA1052@
26 <!-- Using parameters before checking for null -->
27 @CA1062@
28 <!-- Remove IDisposable as Object already has it -->
29 @CA1063@
30 <!-- Exceptions must be public -->
31 @CA1064@
32 <!-- Do not raise exception in unexpected locations -->
33 @CA1065@
34 <!-- String localization -->
35 @CA1303@
36 <!-- Specify IFormatProvider -->
37 @CA1305@
38 <!-- Specify Stringcomparison -->
39 @CA1307@
40 <!-- PInvoke should not be visible -->
41 @CA1401@
42 <!-- Use nameof -->
43 @CA1507@
44 <!-- Parameter underscore -->
45 @CA1707@
46 <!-- Attribute classes must have the Attribute Suffix -->
47 @CA1710@
48 <!-- Replace generic parameter with T -->
49 @CA1715@
50 <!-- Parameter End conflicts with VB -->
51 @CA1716@
52 <!-- Enum field must be plural -->
53 @CA1717@
54 <!-- Variable has type name -->
55 @CA1720@
56 <!-- Property with same name as getter -->
57 @CA1721@
58 <!-- Type name must not match namespace -->
59 @CA1724@
60 <!-- Unused parameter. Lots of warnings regarding Dispose(disposing) -->
61 @CA1801@
62 <!-- Do not ignore function result -->
63 @CA1806@
64 <!-- Remove static constructors -->
65 @CA1810@
66 <!-- Realized classes are never instantiated -->
67 @CA1812@
68 <!-- Override equal and operator equal on Value Types-->
69 @CA1815@
70 <!-- Dispose must call SuppressFinalizers -->
71 @CA1816@
72 <!-- Member can be static -->
73 @CA1822@
74 <!-- Consider zero length array allocation -->
75 @CA1825@
76 <!-- Count() is used where Any() could be used instead to improve performance -->
77 @CA1827@
78 <!-- Use Count instead of Count() -->
79 @CA1829@
80 <!-- Call dispose before going out of scope -->
81 @CA2000@
82 <!-- Call ConfigureWait-->
83 @CA2007@
84 <!-- PInvoke should specify string marshalling -->
85 @CA2101@
86 <!-- Rethrow loses stack info -->
87 @CA2200@
88 <!-- Declare static fields when they are declared and remove static constructor -->
89 @CA2207@
90 <!-- Instantiate exception params correctly -->
91 @CA2208@
92 <!-- Dot not call overrideable methods in constructors -->
93 @CA2214@
94 <!-- Replace implicit operator -->
95 @CA2225@
96 <!-- Change 'XXXXX' to be read-only by removing the property setter -->
97 @CA2227@
98
99
100
101 </Rules>
102 <Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
103 <!-- Ignore docs -->
104 @SA0001@
105
106 <!-- 10** Spacing rules -->
107 @SA1000@
108 @SA1001@
109 @SA1002@
110 @SA1003@
111 <!-- Documentation must start with single space -->
112 @SA1004@
113 @SA1005@
114 @SA1006@
115 @SA1007@
116 @SA1008@
117 @SA1009@
118 @SA1010@
119 @SA1011@
120 @SA1012@
121 @SA1013@
122 @SA1014@
123 @SA1015@
124 @SA1016@
125 @SA1017@
126 @SA1018@
127 @SA1019@
128 @SA1020@
129 @SA1021@
130 @SA1022@
131 @SA1023@
132 @SA1024@
133 @SA1025@
134 @SA1026@
135 @SA1027@
136 @SA1028@
137
138 <!-- Readability -->
139 @SA1100@
140 @SA1101@
141 @SA1102@
142 @SA1103@
143 @SA1104@
144 @SA1105@
145 @SA1106@
146 @SA1107@
147 @SA1108@
148 @SA1109@
149 @SA1110@
150 @SA1111@
151 @SA1112@
152 @SA1113@
153 @SA1114@
154 @SA1115@
155 @SA1116@
156 @SA1117@
157 @SA1118@
158 @SA1119@
159 @SA1120@
160 @SA1121@
161 @SA1122@
162 @SA1123@
163 @SA1124@
164 @SA1125@
165 @SA1126@
166 @SA1127@
167 @SA1128@
168 @SA1129@
169 @SA1130@
170 @SA1131@
171 @SA1132@
172 @SA1133@
173 @SA1134@
174 @SA1135@
175 @SA1136@
176 @SA1137@
177 @SA1138@
178 @SA1139@
179
180 <!-- 12** Ordering -->
181 <!-- FIXME Check if this somehow affects docfx output -->
182 @SA1200@
183 @SA1201@
184 @SA1202@
185 @SA1203@
186 @SA1204@
187 @SA1205@
188 @SA1206@
189 @SA1207@
190 @SA1208@
191 @SA1209@
192 @SA1210@
193 @SA1211@
194 @SA1212@
195 @SA1213@
196 @SA1214@
197 @SA1215@
198 @SA1216@
199 @SA1217@
200
201 <!-- 13** Naming Rules -->
202 <!-- Element start with upper case -->
203 @SA1300@
204 @SA1301@
205 <!-- Interface start with I -->
206 @SA1302@
207 <!-- Upper/lower score rules -->
208 @SA1303@
209 @SA1304@
210 @SA1305@
211 @SA1306@
212 @SA1307@
213 <!-- Variable field prefixes -->
214 @SA1308@
215 @SA1309@
216 @SA1310@
217 @SA1311@
218 @SA1312@
219 @SA1313@
220 @SA1314@
221
222 <!-- 14** Maintainability -->
223 <!-- Access modifier -->
224 @SA1400@
225 <!-- Field must be private -->
226 @SA1401@
227 <!-- File Must contain single class or namespace -->
228 @SA1402@
229 @SA1403@
230 <!-- CodeAnalysis suppress does not have justification -->
231 @SA1404@
232 <!-- Debug.Assert/Fail must provide a message -->
233 @SA1405@
234 @SA1406@
235 <!-- Arithmetic/Conditional expression must declare precedence -->
236 @SA1407@
237 @SA1408@
238 <!-- Remove unecessary code -->
239 @SA1409@
240 <!-- Delegate/Attribute parentheses -->
241 @SA1410@
242 @SA1411@
243 <!-- Utf8 file -->
244 @SA1412@
245 <!-- Trailing commas multiline initializer -->
246 @SA1413@
247
248 <!-- 15** Layout Rules -->
249 @SA1500@
250 @SA1501@
251 @SA1502@
252 @SA1503@
253 @SA1504@
254 @SA1505@
255 @SA1506@
256 @SA1507@
257 @SA1508@
258 @SA1509@
259 @SA1510@
260 @SA1511@
261 @SA1512@
262 @SA1513@
263 @SA1514@
264 @SA1515@
265 @SA1516@
266 @SA1517@
267 @SA1518@
268 @SA1519@
269 @SA1520@
270
271 <!-- 16** Documentation rules -->
272 <!-- Things must be documented -->
273 @SA1600@
274 @SA1601@
275 @SA1602@
276 <!-- Valid xml in docs -->
277 @SA1603@
278 @SA1604@
279 @SA1605@
280 @SA1606@
281 @SA1607@
282 @SA1608@
283 @SA1609@
284 @SA1610@
285 @SA1611@
286 @SA1612@
287 @SA1613@
288 @SA1614@
289 @SA1615@
290 @SA1616@
291 @SA1617@
292 @SA1618@
293 @SA1619@
294 @SA1620@
295 @SA1621@
296 @SA1622@
297 @SA1623@
298 @SA1624@
299 @SA1625@
300 @SA1626@
301 @SA1627@
302 @SA1628@
303 @SA1629@
304 @SA1630@
305 @SA1631@
306 @SA1632@
307 <!-- File headers -->
308 @SA1633@
309 @SA1634@
310 @SA1635@
311 @SA1636@
312 @SA1637@
313 @SA1638@
314 @SA1639@
315 @SA1640@
316 @SA1641@
317 <!-- Constructor/Destructor -->
318 @SA1642@
319 @SA1643@
320 <!-- File header -->
321 @SA1644@
322 <!-- Miscellaneous doc -->
323 @SA1645@
324 @SA1646@
325 @SA1647@
326 @SA1648@
327 <!-- Filename must match file type -->
328 @SA1649@
329 <!-- Spelling -->
330 @SA1650@
331 <!-- Placeholder -->
332 @SA1651@
333 </Rules>
334</RuleSet>