IDE0130 cannot be disabled in .editorconfig
- Dominant language
- C#
- Stars
- 20.7k
- Forks
- 4.3k
- PR merge metrics
- PR metrics pending
Description
**Version Used**: Visual Studio 17.11.4
**Steps to Reproduce**:
1. 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.
2. 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
```
3. 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.
Contributor guide
Research direction
Reproduce the issue in a C# project using Visual Studio 17.11.4 and a solution-level .editorconfig with IDE0130 severity set to none. Start by tracing how the IDE0130 diagnostic reads .editorconfig severity during a build. Done means the IDE0130 message is suppressed while the other configured diagnostics continue to behave normally.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- compilers, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100