Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
AV2210: Removed check on warning level, because since .NET 5, the def…
…ault warning level depends on the target framework and is driven by the AnalysisLevel MSBuild property (see https://devblogs.microsoft.com/dotnet/automatically-find-latent-bugs-in-your-code-with-net-5/ and https://docs.microsoft.com/en-us/dotnet/core/project-sdk/msbuild-props#analysislevel), which analyzers do not have access to by default (it would require user intervention as described at https://stackoverflow.com/questions/69215975/roslyn-codefix-msbuild-properties-metadata-and-unit-testing). So to get a good out-of-the-box experience, we'd need to duplicate the logic from Microsoft.NET.Sdk.Analyzers.targets, which only applies to SDK-style projects and is subject to change in each .NET release. Setting the warning level to 9999 as recommended in https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/compiler-options/errors-warnings#warninglevel does not work anymore since .NET 5, because it gets overwritten at build time by Microsoft.NET.Sdk.Analyzers.targets (dotnet/sdk#21599).
- Loading branch information
1 parent
42da7c5
commit 23aec9e
Showing
4 changed files
with
13 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters