In a c# project create a namespace which doesn't match the folder structure, e.g. in project Xxx use namespace Xxx in a c# file inside folder Yyy.
In the .editorconfig in SolutionItems (shared by all projects in that solution) add the following lines:
[*.cs]
# IDE0130: Namespace does not match folder structure
dotnet_diagnostic.IDE0130.severity = none
Build the project.
Diagnostic Id:
IDE0130 Namespace "Xxx" does not match folder structure, expected "Xxx.Yyy"
Expected Behavior:
No message for IDE0130 should be issued.
Actual Behavior:
A message is reported:
IDE0130 Namespace "Xxx" does not match folder structure, expected "Xxx.Yyy"
All other messages and warnings whose severity has been set to none in .editorconfig are suppressed, which means that in general the .editorconfig file works. Only the line which disables IDE0130 gets ignored.
Version Used: Visual Studio 17.11.4
Steps to Reproduce:
In a c# project create a namespace which doesn't match the folder structure, e.g. in project Xxx use namespace Xxx in a c# file inside folder Yyy.
In the .editorconfig in SolutionItems (shared by all projects in that solution) add the following lines:
Build the project.
Diagnostic Id: IDE0130 Namespace "Xxx" does not match folder structure, expected "Xxx.Yyy"
Expected Behavior: No message for IDE0130 should be issued.
Actual Behavior: A message is reported:
All other messages and warnings whose severity has been set to none in .editorconfig are suppressed, which means that in general the .editorconfig file works. Only the line which disables IDE0130 gets ignored.