Open just-ero opened 1 month ago
Naming rules have severity silent
by default. Can you check to see if a severity was specified on the individual rules, or a severity was set for IDE1006 directly?
This situation may be caused by a change we made recently to diagnostic severity precedence in .editorconfig, but even though we are working to revert that change, it is considered an authoring error to have the same rule in .editorconfig listed with different severities. If the severity is specified in more than one location, the severity in both of those locations should be the same. Otherwise, the severity not being used should be removed from the file altogether.
Yes, the rules themselves have the warning
severity.
I have noticed that dotnet_analyzer_diagnostic.category-Style.severity = none
is able to suppress all property rules (like dotnet_style_require_accessibility_modifiers = warning
). However, rules specified explicitly (like dotnet_diagnostic.IDE0040.severity = warning
) override that suppression.
dotnet_analyzer_diagnostic.category-*.severity
and dotnet_diagnostic.*.severity
are in the same "category" of configuration, and thus have a well-defined precedence order. The rules like dotnet_style_require_accessibility_modifiers
are separate, and their priority depends on the specific SDK version in use along with some project properties. Once .NET 9 SDK (non-preview) is released, this form will have lower priority unless EnableCodeStyleSeverity
is set to true in the project file. Some preview builds of the .NET 9 SDK, as well as some build at the end of .NET 8 SDK, will place this form at higher priority as long as AnalysisLevel
is set to 9 or higher in the project file.
This is expected behavior then? If so, feel free to close.
Version Used
Compiler: 4.12.0-2.24416.3 (ee863ede)
.NET: 9.0.100-preview.7.24407.12
Visual Studio Code: 1.92.2,
fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
, x64C# Extension: v2.44.19
C# Dev Kit Extension: v1.10.10
Steps to Reproduce
.editorconfig
file.silent
..editorconfig
file:Expected Behavior
The naming rule violations are no longer reported.
Actual Behavior
They are.