I'm using an .editorconfig
file on a global level for the entire solution. This is working fine so far. The existing rules do work.
Now I want a rule for VSTHRD200
for my test projects and classes, I've added the following lines:
# Test projects
[{IntegrationTest.*,Test.*}.csproj]
dotnet_diagnostics.VSTHRD200.severity = none # VSTHRD200: Use "Async" suffix for async methods
dotnet_analyzer_diagnostic.VSTHRD200.severity = none # VSTHRD200: Use "Async" suffix for async methods
# Test classes
[Test*.cs]
dotnet_diagnostics.VSTHRD200.severity = none # VSTHRD200: Use "Async" suffix for async methods
dotnet_analyzer_diagnostic.VSTHRD200.severity = none # VSTHRD200: Use "Async" suffix for async methods
These rules do work in a way, that I do not see warnings in Output window. But these rules do not apply to the category-Style
, means I do see curly lines for test methods, which do not have a Async
suffix in editor.
I've added dotnet_analyzer_diagnostic.category-Style.severity = none
like VS 2019 suggested and placed them under the section headers for test projects and classes, but I have the feeling, that it'll disable all styling rules.
Is there a way to only disable the styling for the VSTHRD200
error code?