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

Hidden diagnostics are not displayed in the problems panel #3167

Closed
ExceptionGit opened this issue Jul 12, 2019 · 6 comments
Closed

Hidden diagnostics are not displayed in the problems panel #3167

ExceptionGit opened this issue Jul 12, 2019 · 6 comments

Comments

@ExceptionGit
Copy link

Issue Description

Maybe after this #2873 , the csharp.suppressHiddenDiagnostics option does nothing.

Environment data

C# Extension version: 1.20.0 , v1.21.0-beta1 , v1.21.0-beta2

Steps to reproduce

"csharp.suppressHiddenDiagnostics": false or "csharp.suppressHiddenDiagnostics": true

Expected behavior

Hidden diagnostics should be displayed in the problems panel.

Actual behavior

Hidden diagnostics are not displayed in the problems panel.

@savpek
Copy link
Contributor

savpek commented Jul 14, 2019

They were modified work so that csharp.suppressHiddenDiagnostics controls will hidden diagnostic be hidden or hints instead. Hints are visible as small dots in editor. However they are not visible in problem panel.

image

suppressHiddenDiagnostics was actually bit misleading, it didn't control visibility of issues but instead changed their severity in place from hidden -> information. There is mismatch between roslyn - vscode diagnostics since vscode doesn't have hidden diagnostic level at all.

As far as i know from PR/code history origin for this flag was workaround issue with unused usings where they were not visible since only analysis for them without analyzers had hidden severity. Back then there were no way to control how diagnostics behaved or what their severity was.

You can have fine grained control of issue severity and visibility with .ruleset files which are now supported in bot analyzers enabled and disabled.

Can you solve your use case with .rulesets? If not can you describe use case?

@ExceptionGit
Copy link
Author

Can you solve your use case with .rulesets?

Yes, thanks @savpek . Would be nice to change the flag description to a more detailed.

@rchande
Copy link

rchande commented Jul 15, 2019

@savpek Is there a way to do this without using a ruleset file?

@savpek
Copy link
Contributor

savpek commented Jul 16, 2019

@rchande I don't think that can be done without rulesets at current release.

@fgimian
Copy link

fgimian commented Jul 11, 2021

I will admit that this behaviour confused me too. My expectation would be that such errors would appear in the Problems panel after disabling csharp.suppressHiddenDiagnostics. It would be awesome to see a setting that allowed this to be the case without editing the ruleset or .editorconfig file.

@JoeRobich
Copy link
Member

VS Code does not display hint diagnostics in the problems panel. See microsoft/vscode#45436

@JoeRobich JoeRobich closed this as not planned Won't fix, can't repro, duplicate, stale Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants