vscode-csharp icon indicating copy to clipboard operation
vscode-csharp copied to clipboard

[BUG] Unable to see information items in Problems View

Open arunchndr opened this issue 1 year ago • 1 comments

From vscode-dotnettools created by mahy-ks-hussain: microsoft/vscode-dotnettools#1075

Describe the Issue

I have a solution that has approx. 50 informational items related to refactoring, code style, naming rules, etc, all configured with .editorconfig. When I use this extension, none of those items appear in the Problems view even when "Show Infos" is checked.

For comparison: -Using the Roslynator extension (with the C# extension) does show them. -Visual Studio 2022 shows them (in Error List with no filtering).

Steps To Reproduce

  1. Open a solution with known info items flagged (naming violations, 'this' keyword, conditional simplification, etc)
  2. Look at Problems panel.

Expected Behavior

I should be able to see a list of all the info items. Since VS22 and the VSCode Roslynator extension seem to display them just fine, I'm inclined to think that something in this extension is causing this?

Environment Information

  • OS: Windows
  • VS Code version: 1.88.1
  • Extension version: v1.4.29

arunchndr avatar Apr 24 '24 17:04 arunchndr

Update after some more fiddling around, including not using the Roslynator extension and instead using the packages:

I changed all the severity levels to warning in the .editorconfig as such:

dotnet_analyzer_diagnostic.severity = warning
dotnet_analyzer_diagnostic.category-roslynator.severity = warning
roslynator_refactorings.enabled = true
roslynator_compiler_diagnostic_fixes.enabled = true

The solution has these packages:

CSharpier.MsBuild
Exercism.Tests
Microsoft.NET.Test.Sdk
Roslynator.Analyzers
Roslynator.CodeFixes
Roslynator.Refactorings
xunit
xunit.extensiblity.core
xunit.runner.visualstudio

Now, I'm not sure why the Roslynator issues don't show as warnings (that's a different issue, I think), but they are showing. See comparison below: In Visual Studio 2022: image

In VSCode with C# Dev Kit enabled: image

In VSCode with C# Dev Kit disabled (Use Omnisharp in C# extension enabled): image

Tl;dr - I don't think it's an issue with showing info items vs warnings/errors, but rather it's not showing items from other analyzers.

I would really like to use the C# Dev Kit's test explorer, but this issue is a dealbreaker for me.

mahy-ks-hussain avatar May 02 '24 16:05 mahy-ks-hussain