Change WarningLevel to 9999#48687
Conversation
| <PropertyGroup> | ||
| <LangVersion>preview</LangVersion> | ||
| <WarningLevel>4</WarningLevel> | ||
| <WarningLevel>9999</WarningLevel> |
There was a problem hiding this comment.
Wasn't this supposed to be <AnalysisLevel>latest</AnalysisLevel>?
There was a problem hiding this comment.
@alrz From what I understand, AnalysisLevel is related to the shipped analyzers (CAxxxx) in .NET SDK, not the compiler diagnostics. See https://docs.microsoft.com/dotnet/fundamentals/code-analysis/overview#latest-updates
There was a problem hiding this comment.
perhaps we should adopt AnalysisLevel instead anyway..?
There was a problem hiding this comment.
it is about analyzers but from the article it does affect warning level as well.
There was a problem hiding this comment.
I couldn't see where in the article it mentions warning waves, but if it does affect it, then definitely go with it. If not, then probably add both.
There was a problem hiding this comment.
I recommend setting this to <AnalysisLevel>preview</AnalysisLevel> only if we also want the additional analyzers to be brought along for the ride. As roslyn has rather complex analyzer consumption requirements (as we both build and consume the same analyzers in our build) I recommend <WarningLevel>9999</WarningLevel>
|
We'll wait on this until we can decide whether to adopt AnalysisLevel instead with @jmarolf's help. I was concerned that maybe this would opt us in to the analyzers baked-in to the .NET SDK and be either redundant or undesired (or needs to be controlled via the "-runAnalyzers" flag in our build scripts, etc.) |
Closes #46462
It turns out that we are just so great that we never hit any of our wave 5 warnings. (I did test adding some code that causes a wave 5 warning to verify that this config change does what we expect.)
Tagging @jmarolf for review.