Skip to content

Commit 5a7b15c

Browse files
committed
feat: Add provider XunitProvider
1 parent e94fb95 commit 5a7b15c

File tree

4 files changed

+460
-1
lines changed

4 files changed

+460
-1
lines changed
Lines changed: 355 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,355 @@
1+
{
2+
"Name": "xUnit.net",
3+
"Rules": [
4+
{
5+
"Code": "xUnit1000",
6+
"Title": "Test classes must be public",
7+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1000",
8+
"Category": "Usage",
9+
"TitleAndLink": " - Test classes must be public - https://xunit.net/xunit.analyzers/rules/xUnit1000"
10+
},
11+
{
12+
"Code": "xUnit1001",
13+
"Title": "Fact methods cannot have parameters",
14+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1001",
15+
"Category": "Usage",
16+
"TitleAndLink": " - Fact methods cannot have parameters - https://xunit.net/xunit.analyzers/rules/xUnit1001"
17+
},
18+
{
19+
"Code": "xUnit1002",
20+
"Title": "Test methods cannot have multiple Fact or Theory attributes",
21+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1002",
22+
"Category": "Usage",
23+
"TitleAndLink": " - Test methods cannot have multiple Fact or Theory attributes - https://xunit.net/xunit.analyzers/rules/xUnit1002"
24+
},
25+
{
26+
"Code": "xUnit1003",
27+
"Title": "Theory methods must have test data",
28+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1003",
29+
"Category": "Usage",
30+
"TitleAndLink": " - Theory methods must have test data - https://xunit.net/xunit.analyzers/rules/xUnit1003"
31+
},
32+
{
33+
"Code": "xUnit1004",
34+
"Title": "Test methods should not be skipped",
35+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1004",
36+
"Category": "Usage",
37+
"TitleAndLink": " - Test methods should not be skipped - https://xunit.net/xunit.analyzers/rules/xUnit1004"
38+
},
39+
{
40+
"Code": "xUnit1005",
41+
"Title": "Fact methods should not have test data",
42+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1005",
43+
"Category": "Usage",
44+
"TitleAndLink": " - Fact methods should not have test data - https://xunit.net/xunit.analyzers/rules/xUnit1005"
45+
},
46+
{
47+
"Code": "xUnit1006",
48+
"Title": "Theory methods should have parameters",
49+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1006",
50+
"Category": "Usage",
51+
"TitleAndLink": " - Theory methods should have parameters - https://xunit.net/xunit.analyzers/rules/xUnit1006"
52+
},
53+
{
54+
"Code": "xUnit1007",
55+
"Title": "ClassData must point at a valid class",
56+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1007",
57+
"Category": "Usage",
58+
"TitleAndLink": " - ClassData must point at a valid class - https://xunit.net/xunit.analyzers/rules/xUnit1007"
59+
},
60+
{
61+
"Code": "xUnit1008",
62+
"Title": "Test data attribute should only be used on a Theory",
63+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1008",
64+
"Category": "Usage",
65+
"TitleAndLink": " - Test data attribute should only be used on a Theory - https://xunit.net/xunit.analyzers/rules/xUnit1008"
66+
},
67+
{
68+
"Code": "xUnit1009",
69+
"Title": "InlineData values must match the number of method parameters",
70+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1009",
71+
"Category": "Usage",
72+
"TitleAndLink": " - InlineData values must match the number of method parameters - https://xunit.net/xunit.analyzers/rules/xUnit1009"
73+
},
74+
{
75+
"Code": "xUnit1010",
76+
"Title": "The value is not convertible to the method parameter type",
77+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1010",
78+
"Category": "Usage",
79+
"TitleAndLink": " - The value is not convertible to the method parameter type - https://xunit.net/xunit.analyzers/rules/xUnit1010"
80+
},
81+
{
82+
"Code": "xUnit1011",
83+
"Title": "There is no matching method parameter",
84+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1011",
85+
"Category": "Usage",
86+
"TitleAndLink": " - There is no matching method parameter - https://xunit.net/xunit.analyzers/rules/xUnit1011"
87+
},
88+
{
89+
"Code": "xUnit1012",
90+
"Title": "Null should not be used for value type parameters",
91+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1012",
92+
"Category": "Usage",
93+
"TitleAndLink": " - Null should not be used for value type parameters - https://xunit.net/xunit.analyzers/rules/xUnit1012"
94+
},
95+
{
96+
"Code": "xUnit1013",
97+
"Title": "Public method should be marked as test",
98+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1013",
99+
"Category": "Usage",
100+
"TitleAndLink": " - Public method should be marked as test - https://xunit.net/xunit.analyzers/rules/xUnit1013"
101+
},
102+
{
103+
"Code": "xUnit1014",
104+
"Title": "MemberData should use nameof operator for member name",
105+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1014",
106+
"Category": "Usage",
107+
"TitleAndLink": " - MemberData should use nameof operator for member name - https://xunit.net/xunit.analyzers/rules/xUnit1014"
108+
},
109+
{
110+
"Code": "xUnit1015",
111+
"Title": "MemberData must reference an existing member",
112+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1015",
113+
"Category": "Usage",
114+
"TitleAndLink": " - MemberData must reference an existing member - https://xunit.net/xunit.analyzers/rules/xUnit1015"
115+
},
116+
{
117+
"Code": "xUnit1016",
118+
"Title": "MemberData must reference a public member",
119+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1016",
120+
"Category": "Usage",
121+
"TitleAndLink": " - MemberData must reference a public member - https://xunit.net/xunit.analyzers/rules/xUnit1016"
122+
},
123+
{
124+
"Code": "xUnit1017",
125+
"Title": "MemberData must reference a static member",
126+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1017",
127+
"Category": "Usage",
128+
"TitleAndLink": " - MemberData must reference a static member - https://xunit.net/xunit.analyzers/rules/xUnit1017"
129+
},
130+
{
131+
"Code": "xUnit1018",
132+
"Title": "MemberData must reference a valid member kind",
133+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1018",
134+
"Category": "Usage",
135+
"TitleAndLink": " - MemberData must reference a valid member kind - https://xunit.net/xunit.analyzers/rules/xUnit1018"
136+
},
137+
{
138+
"Code": "xUnit1019",
139+
"Title": "MemberData must reference a member providing a valid data type",
140+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1019",
141+
"Category": "Usage",
142+
"TitleAndLink": " - MemberData must reference a member providing a valid data type - https://xunit.net/xunit.analyzers/rules/xUnit1019"
143+
},
144+
{
145+
"Code": "xUnit1020",
146+
"Title": "MemberData must reference a property with a getter",
147+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1020",
148+
"Category": "Usage",
149+
"TitleAndLink": " - MemberData must reference a property with a getter - https://xunit.net/xunit.analyzers/rules/xUnit1020"
150+
},
151+
{
152+
"Code": "xUnit1021",
153+
"Title": "MemberData should not have parameters if the referenced member is not a method",
154+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1021",
155+
"Category": "Usage",
156+
"TitleAndLink": " - MemberData should not have parameters if the referenced member is not a method - https://xunit.net/xunit.analyzers/rules/xUnit1021"
157+
},
158+
{
159+
"Code": "xUnit1022",
160+
"Title": "Theory methods cannot have a parameter array",
161+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1022",
162+
"Category": "Usage",
163+
"TitleAndLink": " - Theory methods cannot have a parameter array - https://xunit.net/xunit.analyzers/rules/xUnit1022"
164+
},
165+
{
166+
"Code": "xUnit1023",
167+
"Title": "Theory methods cannot have default parameter values",
168+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1023",
169+
"Category": "Usage",
170+
"TitleAndLink": " - Theory methods cannot have default parameter values - https://xunit.net/xunit.analyzers/rules/xUnit1023"
171+
},
172+
{
173+
"Code": "xUnit1024",
174+
"Title": "Test methods cannot have overloads",
175+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1024",
176+
"Category": "Usage",
177+
"TitleAndLink": " - Test methods cannot have overloads - https://xunit.net/xunit.analyzers/rules/xUnit1024"
178+
},
179+
{
180+
"Code": "xUnit1025",
181+
"Title": "InlineData should be unique within the Theory it belongs to",
182+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1025",
183+
"Category": "Usage",
184+
"TitleAndLink": " - InlineData should be unique within the Theory it belongs to - https://xunit.net/xunit.analyzers/rules/xUnit1025"
185+
},
186+
{
187+
"Code": "xUnit1026",
188+
"Title": "Theory methods should use all of their parameters",
189+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1026",
190+
"Category": "Usage",
191+
"TitleAndLink": " - Theory methods should use all of their parameters - https://xunit.net/xunit.analyzers/rules/xUnit1026"
192+
},
193+
{
194+
"Code": "xUnit1027",
195+
"Title": "Collection definition classes must be public",
196+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit1027",
197+
"Category": "Usage",
198+
"TitleAndLink": " - Collection definition classes must be public - https://xunit.net/xunit.analyzers/rules/xUnit1027"
199+
},
200+
{
201+
"Code": "xUnit2000",
202+
"Title": "Constants and literals should be the expected argument",
203+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2000",
204+
"Category": "Assertions",
205+
"TitleAndLink": " - Constants and literals should be the expected argument - https://xunit.net/xunit.analyzers/rules/xUnit2000"
206+
},
207+
{
208+
"Code": "xUnit2001",
209+
"Title": "Do not use invalid equality check",
210+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2001",
211+
"Category": "Assertions",
212+
"TitleAndLink": " - Do not use invalid equality check - https://xunit.net/xunit.analyzers/rules/xUnit2001"
213+
},
214+
{
215+
"Code": "xUnit2002",
216+
"Title": "Do not use null check on value type",
217+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2002",
218+
"Category": "Assertions",
219+
"TitleAndLink": " - Do not use null check on value type - https://xunit.net/xunit.analyzers/rules/xUnit2002"
220+
},
221+
{
222+
"Code": "xUnit2003",
223+
"Title": "Do not use equality check to test for null value",
224+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2003",
225+
"Category": "Assertions",
226+
"TitleAndLink": " - Do not use equality check to test for null value - https://xunit.net/xunit.analyzers/rules/xUnit2003"
227+
},
228+
{
229+
"Code": "xUnit2004",
230+
"Title": "Do not use equality check to test for boolean conditions",
231+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2004",
232+
"Category": "Assertions",
233+
"TitleAndLink": " - Do not use equality check to test for boolean conditions - https://xunit.net/xunit.analyzers/rules/xUnit2004"
234+
},
235+
{
236+
"Code": "xUnit2005",
237+
"Title": "Do not use identity check on value type",
238+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2005",
239+
"Category": "Assertions",
240+
"TitleAndLink": " - Do not use identity check on value type - https://xunit.net/xunit.analyzers/rules/xUnit2005"
241+
},
242+
{
243+
"Code": "xUnit2006",
244+
"Title": "Do not use invalid string equality check",
245+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2006",
246+
"Category": "Assertions",
247+
"TitleAndLink": " - Do not use invalid string equality check - https://xunit.net/xunit.analyzers/rules/xUnit2006"
248+
},
249+
{
250+
"Code": "xUnit2007",
251+
"Title": "Do not use typeof expression to check the type",
252+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2007",
253+
"Category": "Assertions",
254+
"TitleAndLink": " - Do not use typeof expression to check the type - https://xunit.net/xunit.analyzers/rules/xUnit2007"
255+
},
256+
{
257+
"Code": "xUnit2008",
258+
"Title": "Do not use boolean check to match on regular expressions",
259+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2008",
260+
"Category": "Assertions",
261+
"TitleAndLink": " - Do not use boolean check to match on regular expressions - https://xunit.net/xunit.analyzers/rules/xUnit2008"
262+
},
263+
{
264+
"Code": "xUnit2009",
265+
"Title": "Do not use boolean check to check for substrings",
266+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2009",
267+
"Category": "Assertions",
268+
"TitleAndLink": " - Do not use boolean check to check for substrings - https://xunit.net/xunit.analyzers/rules/xUnit2009"
269+
},
270+
{
271+
"Code": "xUnit2010",
272+
"Title": "Do not use boolean check to check for string equality",
273+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2010",
274+
"Category": "Assertions",
275+
"TitleAndLink": " - Do not use boolean check to check for string equality - https://xunit.net/xunit.analyzers/rules/xUnit2010"
276+
},
277+
{
278+
"Code": "xUnit2011",
279+
"Title": "Do not use empty collection check",
280+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2011",
281+
"Category": "Assertions",
282+
"TitleAndLink": " - Do not use empty collection check - https://xunit.net/xunit.analyzers/rules/xUnit2011"
283+
},
284+
{
285+
"Code": "xUnit2012",
286+
"Title": "Do not use Enumerable.Any() to check if a value exists in a collection",
287+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2012",
288+
"Category": "Assertions",
289+
"TitleAndLink": " - Do not use Enumerable.Any() to check if a value exists in a collection - https://xunit.net/xunit.analyzers/rules/xUnit2012"
290+
},
291+
{
292+
"Code": "xUnit2013",
293+
"Title": "Do not use equality check to check for collection size.",
294+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2013",
295+
"Category": "Assertions",
296+
"TitleAndLink": " - Do not use equality check to check for collection size. - https://xunit.net/xunit.analyzers/rules/xUnit2013"
297+
},
298+
{
299+
"Code": "xUnit2014",
300+
"Title": "Do not use throws check to check for asynchronously thrown exception",
301+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2014",
302+
"Category": "Assertions",
303+
"TitleAndLink": " - Do not use throws check to check for asynchronously thrown exception - https://xunit.net/xunit.analyzers/rules/xUnit2014"
304+
},
305+
{
306+
"Code": "xUnit2015",
307+
"Title": "Do not use typeof expression to check the exception type",
308+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2015",
309+
"Category": "Assertions",
310+
"TitleAndLink": " - Do not use typeof expression to check the exception type - https://xunit.net/xunit.analyzers/rules/xUnit2015"
311+
},
312+
{
313+
"Code": "xUnit2016",
314+
"Title": "Keep precision in the allowed range when asserting equality of doubles or decimals.",
315+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2016",
316+
"Category": "Assertions",
317+
"TitleAndLink": " - Keep precision in the allowed range when asserting equality of doubles or decimals. - https://xunit.net/xunit.analyzers/rules/xUnit2016"
318+
},
319+
{
320+
"Code": "xUnit2017",
321+
"Title": "Do not use Contains() to check if a value exists in a collection",
322+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2017",
323+
"Category": "Assertions",
324+
"TitleAndLink": " - Do not use Contains() to check if a value exists in a collection - https://xunit.net/xunit.analyzers/rules/xUnit2017"
325+
},
326+
{
327+
"Code": "xUnit2018",
328+
"Title": "Do not compare an object's exact type to an abstract class or interface",
329+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2018",
330+
"Category": "Assertions",
331+
"TitleAndLink": " - Do not compare an object's exact type to an abstract class or interface - https://xunit.net/xunit.analyzers/rules/xUnit2018"
332+
},
333+
{
334+
"Code": "xUnit2019",
335+
"Title": "Do not use obsolete throws check to check for asynchronously thrown exception",
336+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit2019",
337+
"Category": "Assertions",
338+
"TitleAndLink": " - Do not use obsolete throws check to check for asynchronously thrown exception - https://xunit.net/xunit.analyzers/rules/xUnit2019"
339+
},
340+
{
341+
"Code": "xUnit3000",
342+
"Title": "Test case classes must derive directly or indirectly from Xunit.LongLivedMarshalByRefObject",
343+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit3000",
344+
"Category": "Extensibility",
345+
"TitleAndLink": " - Test case classes must derive directly or indirectly from Xunit.LongLivedMarshalByRefObject - https://xunit.net/xunit.analyzers/rules/xUnit3000"
346+
},
347+
{
348+
"Code": "xUnit3001",
349+
"Title": "Classes that implement Xunit.Abstractions.IXunitSerializable must have a public parameterless constructor",
350+
"Link": "https://xunit.net/xunit.analyzers/rules/xUnit3001",
351+
"Category": "Extensibility",
352+
"TitleAndLink": " - Classes that implement Xunit.Abstractions.IXunitSerializable must have a public parameterless constructor - https://xunit.net/xunit.analyzers/rules/xUnit3001"
353+
}
354+
]
355+
}

0 commit comments

Comments
 (0)