|
2 | 2 | <RuleSet Name="Autofac Analyzer Rules" Description="Analyzer rules for Autofac assemblies." ToolsVersion="16.0"> |
3 | 3 | <IncludeAll Action="Warning" /> |
4 | 4 | <Rules AnalyzerId="Microsoft.Usage" RuleNamespace="Microsoft.Usage"> |
| 5 | + <!-- Avoid excessive parameters on generic types (must be explicitly enabled). --> |
| 6 | + <Rule Id="CA1005" Action="Warning" /> |
5 | 7 | <!-- Don't catch general exceptions - test scenarios sometimes require general exception handling. --> |
6 | 8 | <Rule Id="CA1031" Action="None" /> |
7 | 9 | <!-- Implement standard exception constructors - not all of the exception constructors (e.g., parameterless) are desired in our system. --> |
|
10 | 12 | <Rule Id="CA1040" Action="None" /> |
11 | 13 | <!-- Do not pass literals as localized parameters - tests don't need to localize. --> |
12 | 14 | <Rule Id="CA1303" Action="None" /> |
| 15 | + <!-- Avoid excessive inheritance (must be explicitly enabled). --> |
| 16 | + <Rule Id="CA1501" Action="Warning" /> |
| 17 | + <!-- Avoid excessive complexity (must be explicitly enabled). --> |
| 18 | + <Rule Id="CA1502" Action="Warning" /> |
| 19 | + <!-- Avoid unmaintainable code (must be explicitly enabled). --> |
| 20 | + <Rule Id="CA1505" Action="Warning" /> |
| 21 | + <!-- Avoid excessive class coupling (must be explicitly enabled). --> |
| 22 | + <Rule Id="CA1506" Action="Warning" /> |
13 | 23 | <!-- Use ArgumentNullException.ThrowIfNull - this isn't available until we stop targeting netstandard. --> |
14 | 24 | <Rule Id="CA1510" Action="None" /> |
15 | 25 | <!-- Remove the underscores from member name - unit test scenarios may use underscores. --> |
|
44 | 54 | <Rule Id="SA1121" Action="None" /> |
45 | 55 | <!-- Use String.Empty instead of "". --> |
46 | 56 | <Rule Id="SA1122" Action="None" /> |
47 | | - <!-- Using statements must be inside a namespace. --> |
48 | | - <Rule Id="SA1200" Action="None" /> |
49 | | - <!-- Enforce order of class members by member type. --> |
| 57 | + <!-- Enforce order of class members by member type - sometimes putting test classes/data by the test helps. --> |
50 | 58 | <Rule Id="SA1201" Action="None" /> |
51 | | - <!-- Enforce order of class members by member visibility. --> |
| 59 | + <!-- Enforce order of class members by member visibility - sometimes putting test classes/data by the test helps. --> |
52 | 60 | <Rule Id="SA1202" Action="None" /> |
53 | | - <!-- Enforce order of constantand static members. --> |
54 | | - <Rule Id="SA1203" Action="None" /> |
55 | | - <!-- Enforce order of static vs. non-static members. --> |
| 61 | + <!-- Enforce order of static vs. non-static members - sometimes putting test classes/data by the test helps. --> |
56 | 62 | <Rule Id="SA1204" Action="None" /> |
57 | | - <!-- Modifiers are not ordered - .editorconfig handles this. --> |
58 | | - <Rule Id="SA1206" Action="None" /> |
59 | | - <!-- Enforce order of readonly vs. non-readonly members. --> |
60 | | - <Rule Id="SA1214" Action="None" /> |
61 | 63 | <!-- Fields can't start with underscore. --> |
62 | 64 | <Rule Id="SA1309" Action="None" /> |
63 | | - <!-- Suppressions must have a justification. --> |
64 | | - <Rule Id="SA1404" Action="None" /> |
65 | 65 | <!-- Elements should be documented. --> |
66 | 66 | <Rule Id="SA1600" Action="None" /> |
67 | | - <!-- Enuemration items should be documented. --> |
| 67 | + <!-- Partial items should be documented. --> |
| 68 | + <Rule Id="SA1601" Action="None" /> |
| 69 | + <!-- Enumeration items should be documented. --> |
68 | 70 | <Rule Id="SA1602" Action="None" /> |
| 71 | + <!-- Parameter should be documented. --> |
| 72 | + <Rule Id="SA1611" Action="None" /> |
69 | 73 | <!-- Parameter documentation must be in the right order. --> |
70 | 74 | <Rule Id="SA1612" Action="None" /> |
71 | 75 | <!-- Return value must be documented. --> |
|
74 | 78 | <Rule Id="SA1618" Action="None" /> |
75 | 79 | <!-- Don't copy/paste documentation. --> |
76 | 80 | <Rule Id="SA1625" Action="None" /> |
77 | | - <!-- Exception documentation must not be empty. --> |
78 | | - <Rule Id="SA1627" Action="None" /> |
79 | | - <!-- Enable XML documentation output. --> |
80 | | - <Rule Id="SA1652" Action="None" /> |
81 | 81 | <!-- Private member is unused - tests for reflection require members that may not get used. --> |
82 | 82 | <Rule Id="IDE0051" Action="None" /> |
83 | 83 | <!-- Private member assigned value never read - tests for reflection require values that may not get used. --> |
|
0 commit comments