Skip to content

Commit b0113d5

Browse files
authored
Feature/1898 fix diagnostics (#1928)
1 parent fb2b69d commit b0113d5

File tree

277 files changed

+1391
-1380
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

277 files changed

+1391
-1380
lines changed

.editorconfig

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ dotnet_style_predefined_type_for_member_access = true:suggestion
6464
dotnet_style_readonly_field = true:warning
6565

6666
# Suggest more modern language features when available
67-
dotnet_style_object_initializer = true:suggestion
67+
dotnet_style_object_initializer = true:silent
6868
dotnet_style_collection_initializer = true:suggestion
6969
dotnet_style_coalesce_expression = true:suggestion
7070
dotnet_style_null_propagation = true:suggestion
@@ -74,7 +74,7 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
7474
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
7575
dotnet_style_prefer_conditional_expression_over_return = false
7676
dotnet_style_prefer_conditional_expression_over_assignment = false
77-
dotnet_style_prefer_auto_properties = true:suggestion
77+
dotnet_style_prefer_auto_properties = true:silent
7878

7979
# Parentheses
8080
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent

Rx.NET/Source/Directory.build.props

Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,11 @@
1313
<DefaultLanguage>en-US</DefaultLanguage>
1414
<IncludeSymbols>false</IncludeSymbols>
1515
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
16-
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Rx.ruleset</CodeAnalysisRuleSet>
1716
<GeneratePackageOnBuild Condition=" '$(IsTestProject)' != 'true' and '$(CreatePackage)' == 'true' ">true</GeneratePackageOnBuild>
1817
<PackageOutputPath>$(MSBuildThisFileDirectory)artifacts</PackageOutputPath>
1918
<EmbedUntrackedSources>true</EmbedUntrackedSources>
2019
<PublishRepositoryUrl>true</PublishRepositoryUrl>
2120
<LangVersion>latest</LangVersion>
22-
23-
<!-- Get diagnostics back to the level that the .NET 5.0 SDK had for now. Fix these properly before release. -->
24-
<AnalysisLevel>5-Default</AnalysisLevel>
25-
<NoWarn>$(NoWarn);CS8600;CS8602;CS8603;CS8604;CS8632;CA1000;CA1003;CA1014;CA1019;CA1033;CA1045;CA1051;CA1052;CA1063;CA1067;CA1068;CA1507;CA1707;CA1711;CA1716;CA1720;CA1806;CA1815;CA1816;CA1822;CA1825;CA1840;CA1845;CA2016;CA2109;CA2201;CA2211;CA2213;CA2249;IDE0003;IDE0016;IDE0017;IDE0018;IDE0019;IDE0020;IDE0031;IDE0032;IDE0034;IDE0037;IDE0038;IDE0039;IDE0040;IDE0044;IDE0051;IDE0052;IDE0056;IDE0057;IDE0059;IDE0060;IDE0062;IDE0063;IDE0071;IDE0074;IDE0075;IDE0076;IDE0077;IDE0079;IDE0083;IDE0090;IDE0180;IDE0270;IDE0280;IDE1006;IDE1056</NoWarn>
2621
</PropertyGroup>
2722

2823
<PropertyGroup Condition="'$(Configuration)' != 'Debug'">
@@ -43,4 +38,35 @@
4338
<PackageReference Include="coverlet.collector" Version="3.2.0" />
4439
</ItemGroup>
4540

41+
<PropertyGroup>
42+
<AnalysisLevelDesign>7.0-default</AnalysisLevelDesign>
43+
<AnalysisLevelNaming>7.0-all</AnalysisLevelNaming>
44+
<AnalysisLevelPerformance>7.0-all</AnalysisLevelPerformance>
45+
46+
<!-- Enable analyzers on older targets. -->
47+
<EnableNETAnalyzers>true</EnableNETAnalyzers>
48+
49+
<!--
50+
Disable diagnostics:
51+
CA1001 - types holding disposable fields should implement IDisposable. See next item.
52+
CA2213 - IDisposable types should Dispose any IDisposable fields. This rule finds over 600
53+
examples! These are all in subtle multithreaded or async code. Some of them appear
54+
not to be real problems. For example, there are places where schedulers retain
55+
references to IDisposable work items, but that IDisposable interfaces is only there
56+
to enable application code to cancel scheduled work, so it's not Rx's place to call
57+
Dispose. And there are more subtle cases where disposal is deferred to give threads
58+
a chance to shut down. Each of these likely needs individual review:
59+
https://github.com/dotnet/reactive/issues/1927
60+
61+
IDE0056 - Use of index/range syntax - relevant types not available on all targets, so we can't
62+
IDE0057 do this.
63+
-->
64+
<!-- Get diagnostics back to the level that the .NET 5.0 SDK had for now. Fix these properly before release. -->
65+
<NoWarn>$(NoWarn);CA1001;CA2213;IDE0056;IDE0057</NoWarn>
66+
</PropertyGroup>
67+
68+
<ItemGroup>
69+
<GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)analyzers.globalconfig" />
70+
</ItemGroup>
71+
4672
</Project>

Rx.NET/Source/Rx.ruleset

Lines changed: 0 additions & 222 deletions
This file was deleted.

Rx.NET/Source/System.Reactive.sln

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11

22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.28407.52
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.5.33627.172
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive", "src\System.Reactive\System.Reactive.csproj", "{01706A0F-8A63-4FD6-AF45-0BC0BED3C0D9}"
77
EndProject
@@ -15,6 +15,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.System.Reactive.Uwp.D
1515
EndProject
1616
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{870348D0-C0A0-4352-8A02-E00AB0CCB919}"
1717
ProjectSection(SolutionItems) = preProject
18+
..\..\.editorconfig = ..\..\.editorconfig
19+
src\.editorconfig = src\.editorconfig
20+
analyzers.globalconfig = analyzers.globalconfig
1821
..\..\azure-pipelines.rx.yml = ..\..\azure-pipelines.rx.yml
1922
Directory.build.props = Directory.build.props
2023
Directory.build.targets = Directory.build.targets
@@ -25,6 +28,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
2528
EndProjectSection
2629
EndProject
2730
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{D324579D-CBE6-4867-8980-D7842C7C45A2}"
31+
ProjectSection(SolutionItems) = preProject
32+
tests\.editorconfig = tests\.editorconfig
33+
tests\Directory.build.props = tests\Directory.build.props
34+
tests\Directory.build.targets = tests\Directory.build.targets
35+
EndProjectSection
2836
EndProject
2937
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Facades", "Facades", "{A0F39260-B8F8-4FCB-9679-0ED917A22BDF}"
3038
ProjectSection(SolutionItems) = preProject

0 commit comments

Comments
 (0)