-
-
Notifications
You must be signed in to change notification settings - Fork 846
Expand file tree
/
Copy pathSource.ruleset
More file actions
66 lines (66 loc) · 3.55 KB
/
Copy pathSource.ruleset
File metadata and controls
66 lines (66 loc) · 3.55 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
<?xml version="1.0" encoding="utf-8"?>
<RuleSet Name="Autofac Analyzer Rules" Description="Analyzer rules for Autofac source assemblies." ToolsVersion="16.0">
<IncludeAll Action="Warning" />
<Rules AnalyzerId="Microsoft.CodeAnalysis.Analyzers" RuleNamespace="Microsoft.CodeAnalysis.Analyzers">
<!-- Implement standard exception constructors - not all of the exception constructors are desired. -->
<Rule Id="CA1032" Action="None" />
<!-- Implement IDisposable correctly (must be explicitly enabled). -->
<Rule Id="CA1063" Action="Warning" />
<!-- 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 - not available in netstandard. -->
<Rule Id="CA1510" Action="None" />
<!-- Use ArgumentOutOfRangeException.ThrowIfNegative - not available below net8.0. -->
<Rule Id="CA1512" Action="None" />
<!-- Use ObjectDisposedException.ThrowIf - not available below net8.0. -->
<Rule Id="CA1513" Action="None" />
<!-- Change names to avoid reserved word overlaps - would break public API. -->
<Rule Id="CA1716" Action="None" />
<!-- Cache a CompositeFormat - not available in netstandard. -->
<Rule Id="CA1863" Action="None" />
<!-- Implement serialization constructors - false positive in .NET Core. -->
<Rule Id="CA2229" Action="None" />
<!-- Mark ISerializable types with SerializableAttribute - false positive in .NET Core. -->
<Rule Id="CA2237" Action="None" />
<!-- Prefer generic overloads - conflicts with reflection work in Autofac. -->
<Rule Id="CA2263" Action="None" />
</Rules>
<Rules AnalyzerId="SonarAnalyzer.CSharp" RuleNamespace="SonarAnalyzer.CSharp">
<!-- "Sonar Way" rules to match SonarQube scans. -->
<Rule Id="S107" Action="Warning" />
<!-- Do not use obsolete members - Autofac maintains deprecated APIs for backward compat. -->
<Rule Id="S1133" Action="None" />
<Rule Id="S1192" Action="Warning" />
<Rule Id="S1313" Action="Warning" />
<Rule Id="S2259" Action="Warning" />
<Rule Id="S2583" Action="Warning" />
<Rule Id="S2589" Action="Warning" />
<!-- Verify reflection accessibility bypass - DI containers do extensive reflection by design. -->
<Rule Id="S3011" Action="None" />
<!-- Loops should use LINQ - DI container hot paths intentionally avoid LINQ allocations. -->
<Rule Id="S3267" Action="None" />
<Rule Id="S3776" Action="Warning" />
<!-- IDisposable pattern - Autofac uses non-standard dispose patterns for container lifecycle. -->
<Rule Id="S3881" Action="None" />
<!-- Split method for params check + iterator - overly prescriptive for our patterns. -->
<Rule Id="S4456" Action="None" />
<Rule Id="S6418" Action="Warning" />
<Rule Id="S6444" Action="Warning" />
</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>