-
-
Notifications
You must be signed in to change notification settings - Fork 846
Expand file tree
/
Copy pathSource.ruleset
More file actions
42 lines (42 loc) · 2.72 KB
/
Copy pathSource.ruleset
File metadata and controls
42 lines (42 loc) · 2.72 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
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Autofac Analyzer Rules" Description="Analyzer rules for Autofac assemblies." ToolsVersion="16.0">
<IncludeAll Action="Warning" />
<Rules AnalyzerId="Microsoft.Usage" RuleNamespace="Microsoft.Usage">
<!-- Implement standard exception constructors - not all of the exception constructors (e.g., parameterless) are desired in our system. -->
<Rule Id="CA1032" Action="None" />
<!-- Avoid excessive inheritance (must be explicitly enabled). -->
<Rule Id="CA1501" Action="Warning" />
<!-- Avoid excessive complexity (must be explicitly enabled). -->
<Rule Id="CA1502" Action="Warning" />
<!-- Avoid unmaintainable code (must be explicitly enabled). -->
<Rule Id="CA1505" Action="Warning" />
<!-- Avoid excessive class coupling (must be explicitly enabled). -->
<Rule Id="CA1506" Action="Warning" />
<!-- Use ArgumentNullException.ThrowIfNull - this isn't available until we stop targeting netstandard. -->
<Rule Id="CA1510" Action="None" />
<!-- Use ArgumentOutOfRangeException.ThrowIfNegative - this isn't available until we stop targeting anything below net8.0. -->
<Rule Id="CA1512" Action="None" />
<!-- Use ObjectDisposedException.ThrowIf - this isn't available until we stop targeting anything below net8.0. -->
<Rule Id="CA1513" Action="None" />
<!-- Change names to avoid reserved word overlaps (e.g., Delegate, GetType, etc.) - too many of these in the public API, we'd break if we fixed it. -->
<Rule Id="CA1716" Action="None" />
<!-- Cache a CompositeFormat object for use in String.Format - this isn't available until we stop targeting netstandard, and we only String.Format when throwing exceptions so the work/complexity isn't justified to increase perf just for those situations. -->
<Rule Id="CA1863" Action="None" />
<!-- Implement serialization constructors - false positive when building .NET Core. -->
<Rule Id="CA2229" Action="None" />
<!-- Mark ISerializable types with SerializableAttribute - false positive when building .NET Core. -->
<Rule Id="CA2237" Action="None" />
<!-- Prefer generic overloads to using Type parameters - many aren't available in earlier frameworks; and we do a lot of reflection work in Autofac. -->
<Rule Id="CA2263" Action="None" />
</Rules>
<Rules AnalyzerId="StyleCop.Analyzers" RuleNamespace="StyleCop.Analyzers">
<!-- Prefix local calls with this. -->
<Rule Id="SA1101" Action="None" />
<!-- Use built-in type alias. -->
<Rule Id="SA1121" Action="None" />
<!-- Use String.Empty instead of "". -->
<Rule Id="SA1122" Action="None" />
<!-- Fields can't start with underscore. -->
<Rule Id="SA1309" Action="None" />
</Rules>
</RuleSet>