|
13 | 13 | <DefaultLanguage>en-US</DefaultLanguage> |
14 | 14 | <IncludeSymbols>false</IncludeSymbols> |
15 | 15 | <IsTestProject>$(MSBuildProjectName.Contains('Tests'))</IsTestProject> |
16 | | - <CodeAnalysisRuleSet>$(MSBuildThisFileDirectory)Rx.ruleset</CodeAnalysisRuleSet> |
17 | 16 | <GeneratePackageOnBuild Condition=" '$(IsTestProject)' != 'true' and '$(CreatePackage)' == 'true' ">true</GeneratePackageOnBuild> |
18 | 17 | <PackageOutputPath>$(MSBuildThisFileDirectory)artifacts</PackageOutputPath> |
19 | 18 | <EmbedUntrackedSources>true</EmbedUntrackedSources> |
20 | 19 | <PublishRepositoryUrl>true</PublishRepositoryUrl> |
21 | 20 | <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> |
26 | 21 | </PropertyGroup> |
27 | 22 |
|
28 | 23 | <PropertyGroup Condition="'$(Configuration)' != 'Debug'"> |
|
43 | 38 | <PackageReference Include="coverlet.collector" Version="3.2.0" /> |
44 | 39 | </ItemGroup> |
45 | 40 |
|
| 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 | + |
46 | 72 | </Project> |
0 commit comments