Skip to content

Commit

Permalink
Feature/1898 fix diagnostics (#1928)
Browse files Browse the repository at this point in the history
  • Loading branch information
idg10 committed May 11, 2023
1 parent fb2b69d commit b0113d5
Show file tree
Hide file tree
Showing 277 changed files with 1,391 additions and 1,380 deletions.
4 changes: 2 additions & 2 deletions .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ dotnet_style_predefined_type_for_member_access = true:suggestion
dotnet_style_readonly_field = true:warning

# Suggest more modern language features when available
dotnet_style_object_initializer = true:suggestion
dotnet_style_object_initializer = true:silent
dotnet_style_collection_initializer = true:suggestion
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
Expand All @@ -74,7 +74,7 @@ dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_conditional_expression_over_return = false
dotnet_style_prefer_conditional_expression_over_assignment = false
dotnet_style_prefer_auto_properties = true:suggestion
dotnet_style_prefer_auto_properties = true:silent

# Parentheses
dotnet_style_parentheses_in_arithmetic_binary_operators = always_for_clarity:silent
Expand Down
36 changes: 31 additions & 5 deletions Rx.NET/Source/Directory.build.props
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,11 @@
<DefaultLanguage>en-US</DefaultLanguage>
<IncludeSymbols>false</IncludeSymbols>
<IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject>
<CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Rx.ruleset</CodeAnalysisRuleSet>
<GeneratePackageOnBuild Condition=" '$(IsTestProject)' != 'true' and '$(CreatePackage)' == 'true' ">true</GeneratePackageOnBuild>
<PackageOutputPath>$(MSBuildThisFileDirectory)artifacts</PackageOutputPath>
<EmbedUntrackedSources>true</EmbedUntrackedSources>
<PublishRepositoryUrl>true</PublishRepositoryUrl>
<LangVersion>latest</LangVersion>

<!-- Get diagnostics back to the level that the .NET 5.0 SDK had for now. Fix these properly before release. -->
<AnalysisLevel>5-Default</AnalysisLevel>
<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>
</PropertyGroup>

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

<PropertyGroup>
<AnalysisLevelDesign>7.0-default</AnalysisLevelDesign>
<AnalysisLevelNaming>7.0-all</AnalysisLevelNaming>
<AnalysisLevelPerformance>7.0-all</AnalysisLevelPerformance>

<!-- Enable analyzers on older targets. -->
<EnableNETAnalyzers>true</EnableNETAnalyzers>

<!--
Disable diagnostics:
CA1001 - types holding disposable fields should implement IDisposable. See next item.
CA2213 - IDisposable types should Dispose any IDisposable fields. This rule finds over 600
examples! These are all in subtle multithreaded or async code. Some of them appear
not to be real problems. For example, there are places where schedulers retain
references to IDisposable work items, but that IDisposable interfaces is only there
to enable application code to cancel scheduled work, so it's not Rx's place to call
Dispose. And there are more subtle cases where disposal is deferred to give threads
a chance to shut down. Each of these likely needs individual review:
https://github.com/dotnet/reactive/issues/1927
IDE0056 - Use of index/range syntax - relevant types not available on all targets, so we can't
IDE0057 do this.
-->
<!-- Get diagnostics back to the level that the .NET 5.0 SDK had for now. Fix these properly before release. -->
<NoWarn>$(NoWarn);CA1001;CA2213;IDE0056;IDE0057</NoWarn>
</PropertyGroup>

<ItemGroup>
<GlobalAnalyzerConfigFiles Include="$(MSBuildThisFileDirectory)analyzers.globalconfig" />
</ItemGroup>

</Project>
222 changes: 0 additions & 222 deletions Rx.NET/Source/Rx.ruleset

This file was deleted.

12 changes: 10 additions & 2 deletions Rx.NET/Source/System.Reactive.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.28407.52
# Visual Studio Version 17
VisualStudioVersion = 17.5.33627.172
MinimumVisualStudioVersion = 10.0.40219.1
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "System.Reactive", "src\System.Reactive\System.Reactive.csproj", "{01706A0F-8A63-4FD6-AF45-0BC0BED3C0D9}"
EndProject
Expand All @@ -15,6 +15,9 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Tests.System.Reactive.Uwp.D
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{870348D0-C0A0-4352-8A02-E00AB0CCB919}"
ProjectSection(SolutionItems) = preProject
..\..\.editorconfig = ..\..\.editorconfig
src\.editorconfig = src\.editorconfig
analyzers.globalconfig = analyzers.globalconfig
..\..\azure-pipelines.rx.yml = ..\..\azure-pipelines.rx.yml
Directory.build.props = Directory.build.props
Directory.build.targets = Directory.build.targets
Expand All @@ -25,6 +28,11 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Tests", "Tests", "{D324579D-CBE6-4867-8980-D7842C7C45A2}"
ProjectSection(SolutionItems) = preProject
tests\.editorconfig = tests\.editorconfig
tests\Directory.build.props = tests\Directory.build.props
tests\Directory.build.targets = tests\Directory.build.targets
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Facades", "Facades", "{A0F39260-B8F8-4FCB-9679-0ED917A22BDF}"
ProjectSection(SolutionItems) = preProject
Expand Down

0 comments on commit b0113d5

Please sign in to comment.