Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Editorconfig severity changes not respected #46784

Closed
mavasani opened this issue Aug 13, 2020 · 3 comments · Fixed by #46801
Closed

Editorconfig severity changes not respected #46784

mavasani opened this issue Aug 13, 2020 · 3 comments · Fixed by #46801

Comments

@mavasani
Copy link
Contributor

mavasani commented Aug 13, 2020

Version Used: Latest 16.8 P2 dogfood build

Steps to Reproduce:

  1. Create a new C# class library project with below source code and verify IDE0051 reported for M:
class C
{
    void M() { }
}
  1. Add an .editorconfig manually file at root of the project with following contents:
[*.cs]

dotnet_diagnostic.IDE0051.severity = warning
  1. Switch back to the source file and see the diagnostics/squiggles on M

Expected Behavior:
IDE0051 warning in error list and a squiggle for the same in the editor

Actual Behavior:
IDE0051 is still a message and there is no squiggle.

  1. Keep editing the source file, say renaming M to M2, renaming the containing type, adding more code, etc.

Expected Behavior:
.editorconfig dotnet_diagnostic should take effect at least after doing some source code edits.

Actual Behavior:
IDE0051 is still a message and there is no squiggle. The diagnostic correctly gets updated to say M2 instead of M, so diagnostics are not stale - just the fact that new editorconfig settings are not being applied at all. Only way to get these applied are to close and re-open/reload the project.

@mavasani
Copy link
Contributor Author

I verified that issue started happening after #44331. It does not repro on 16.8 P2 builds prior to that change getting merged. @jasonmalinowski can you take a look? I'll try to work on an integration test to repro this behavior.

@sharwell
Copy link
Member

I observed this as well when testing from the master branch.

@mavasani
Copy link
Contributor Author

I was able to write an integration test for this regression: #46794

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants