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

Suppress No Longer Showing in Error List #74228

Open
vsfeedback opened this issue Jul 1, 2024 · 22 comments
Open

Suppress No Longer Showing in Error List #74228

vsfeedback opened this issue Jul 1, 2024 · 22 comments
Assignees
Labels
Area-IDE Bug LSP issues related to the roslyn language server protocol implementation
Milestone

Comments

@vsfeedback
Copy link

This issue has been moved from a ticket on Developer Community.


[regression] [worked-in:17.9]
Since updating to Visual Studio 2022 Version 17.10.3 "Suppress" does not show up in the Error List context menu.

Suppress Message.png


Original Comments

Feedback Bot on 6/26/2024, 00:18 PM:

(private comment, text removed)


Original Solutions

(no solutions)

@dotnet-issue-labeler dotnet-issue-labeler bot added Area-IDE untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 1, 2024
@arunchndr
Copy link
Member

This is a known limitation with LSP not supporting suppression states. In the interim suppression via lightbulb is still a workaround.

@arunchndr arunchndr added this to the Backlog milestone Jul 1, 2024
@arunchndr arunchndr added Bug LSP issues related to the roslyn language server protocol implementation and removed untriaged Issues and PRs which have not yet been triaged by a lead labels Jul 1, 2024
@CyrusNajmabadi
Copy link
Member

PR removing command handler code here: #74266. (NOte the code to actually apply the suppression still exists. if we do an LSP handler here, it would call into that).

@RealDotNetDave
Copy link

I hope these can be fixed before the November release! Using the Light Bulb slows things down.

@goldcanyon340
Copy link

This is still not showing in v17.12.0

@CyrusNajmabadi
Copy link
Member

This is still not showing in v17.12.0

This is in the backlog

@CyrusNajmabadi
Copy link
Member

Closing out as we do not intend on bringing this back based on the low valume of feedback here and high complexity of implementation. 'supress' can be handled through the lightbulb now.

@CyrusNajmabadi CyrusNajmabadi closed this as not planned Won't fix, can't repro, duplicate, stale Nov 26, 2024
@RealDotNetDave
Copy link

This is disappointing. This just makes this process take longer using the lightbulb.

@dotnet dotnet locked and limited conversation to collaborators Jan 17, 2025
@arunchndr arunchndr reopened this Jan 22, 2025
@arunchndr
Copy link
Member

Keeping this open to gather votes for a little while.

@dotnet dotnet unlocked this conversation Jan 22, 2025
@inthemedium
Copy link

How do we vote "yes PLEASE"? :-)

@CyrusNajmabadi
Copy link
Member

Thumbs up the main post.

@ShaunLoganOracle
Copy link

ShaunLoganOracle commented Jan 31, 2025

Please restore the previous functionality. Once we upgraded VS 22 from 17.8 to 17.11, our use case (VSTO Add-in for Excel, .NET Framework 4.8, FxCopCmd.exe) is completely broken for Code Analysis:

  1. All CAnnnn warnings are shown in the VS 22 Error List - even those that have been suppressed in the source code (for example using: [System.Diagnostics.CodeAnalysis.SuppressMessage ("Microsoft.Usage", "CA2227:CollectionPropertiesShouldBeReadOnly")]) - the SuppressMessage attributes are being ignored. This makes it very hard to distinguish between previously suppressed issues and new issues.
  2. For any CAnnnn issue shown in the Error List window, there is no longer a right-click (context) menu choice to Suppress. Using the Light-bulb workaround suggested above does not work for us, since that suppresses the IDEnnnn message, not the CAnnnn message (so the latter still shows in the Error List).

@goldcanyon340
Copy link

It is very frustrating that this functionality has been removed

@arunchndr
Copy link
Member

not the CAnnnn message

This we think is a bug. We are investigating. @ShaunLoganOracle

@arunchndr
Copy link
Member

@ShaunLoganOracle your issue of error list showing suppressed issues was fixed in 17.12. Please try upgrading and let us know if you still see issues.

@ShaunLoganOracle
Copy link

@arunchndr I upgraded to VS2022 17.12.5 and I still see both issues previously reported:

  1. Suppressed build CA Warnings are appearing in the error list (screen shot below)
  2. Right-click menu in Error List does not have the Suppress (in Code) menu item

Image

@CyrusNajmabadi
Copy link
Member

Does the lightbulb on the item (in source code) have an option to suppress that issue (at the document, or solution level)?

@ShaunLoganOracle
Copy link

Does the lightbulb on the item (in source code) have an option to suppress that issue (at the document, or solution level)?

No. There is no lightbulb in the left-hand gutter. There is a screwdriver:

Image

If I right-click on the method and choose the light-bulb (Quick Actions and Refactorings), I don't see any option to suppress:

Image

@CyrusNajmabadi
Copy link
Member

Oh duh. Because it's already suppressed. Brain fart. We will look into why these suppressed items are showing up in the error list. @dibarbet can you ptal?

@dibarbet
Copy link
Member

@ShaunLoganOracle - to confirm, these look like legacy fxcop errors that are produced on build (FxCopCmd.exe), correct? Can you confirm if the output from the "Build" tab reports the suppressed errors in 17.12 (and share a snippet)? I would expect it to not report them.

For example, in my 17.12 instance with a suppression (note no CA1032 reported)

Image

And no error in the error list as expected.

Commenting out the suppression leads to the error being reported.

Image

There's a number of ways errors can be reported, so just trying to track down the source. Thanks!

@ShaunLoganOracle
Copy link

@dibarbet
Yes, those are FxCopCmd.exe build errors.
More background in the post above.

Yes, if I change the filter from "Build+Intellisense" to "Build Only" I still see the CA1007 that is suppressed in source via a [SuppressMessage] attribute in the Error List window.

Image

Note also that in the Error List window, the "Code" and "Suppression State" columns are blank for this issue - is that a clue?

VS22:

Image

@dibarbet
Copy link
Member

Yes, if I change the filter from "Build+Intellisense" to "Build Only" I still see the CA1007 that is suppressed in source via a [SuppressMessage] attribute in the Error List window.

To clarify, I meant do you see it in the text output in the "Output" window under the "Build" dropdown? If you could share a small snippet of what you see for an affected project that would be useful

@ShaunLoganOracle
Copy link

Yes, the CA1007 warning appears both in the Error List window as the previous screen shots show, and also in the Output window with "Build" selected as seen here:

Image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-IDE Bug LSP issues related to the roslyn language server protocol implementation
Projects
None yet
Development

No branches or pull requests

8 participants