SonarSource / sonarlint-visualstudio

SonarLint extension for VisualStudio
https://redirect.sonarsource.com/doc/sonar-visualstudio.html
GNU Lesser General Public License v3.0
466 stars 77 forks source link

SonarLint does not suppress issues marked as Won't fix in error list #2013

Closed NPadrutt closed 3 years ago

NPadrutt commented 3 years ago

Description

I currently see around 40 messages of S2221 "catch a list of specific exception subtype or use exception filters instead" in visual studio, although I have all of those marked as Won't fix on my SonarCloud Project. In The output in Visual Studio I can see that suppressions are loaded. The connected project is correct aswell, since when I reopen an issue on SonarCloud and update in Visual Studio the number of Suppressions loaded is adjusted accordingly.

Repro steps

For this particular issue:

  1. Add a catch for Exception without filter
  2. Upload it to the repo and let SonarCloud run
  3. Mark issue as "Won't Fix"
  4. Update Binding in Visual Studio
  5. See issue still highlighted / noted in the error list.

If possible then please create a git repository with a repro sample or attach a zip to the issue.

Expected behavior

Issues marked as Won't Fix or False Positive are not shown in the Error List in Visual Studio.

Actual behavior

All issues show app in Visual Studio

Known workarounds

Non so far.

Related information

rita-gorokhod commented 3 years ago

Hi @NPadrutt, thanks for reporting this to us. We are aware of this issue, please refer to #1005 for more information. Although we cannot commit on the exact resolution date, you can expect it to be fixed in the next few releases. I will close this as duplicate.