Open gewarren opened 2 years ago
There was a recent change in this area in https://github.com/dotnet/sdk/pull/24826.
Old behavior was that AnalysisLevel
overwrites WarningLevel
. So WarningLevel
wasn't taken into account if AnalysisLevel
is set.
New behavior is AnalysisLevel
sets WarningLevel
only if the user didn't set WarningLevel
himself.
cc @baronfel @jmarolf @mavasani
Yep, we generally want defaults to only be set if the user hasn't set something, and thanks to @Youssef1313 we found a bug where we were unconditionally setting the WarningLevel. It's definitely been one of those issues' that's spiralled a bit past my initial expected size, though!
The docs currently describe the old behavior. See here.
When does the new behavior ship? And, is that going to change the Visual Studio option pages?o
The AnalysisLevel property seems to be shared between C# compiler messages and Roslyn code analysis. I'll log an issue to make note of this in the code analysis and C# compiler options docs.
We also might want to update the verbiage around CodeAnalysisRuleSet since rulesets are deprecated in favor of .editorconfig files.
Originally posted by @gewarren in https://github.com/dotnet/docs/issues/29498#issuecomment-1130331975
Document Details
⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.