IDE0079 triggering false positives on various suppressed diagnostics #75887
Labels
Area-Analyzers
Feature - IDE0079
Remove unnecessary suppression
untriaged
Issues and PRs which have not yet been triaged by a lead
Version Used:
.NET 9 SDK 9.0.100 (though this also occurs on projects targeting .NET 8)
Steps to Reproduce:
Since the update to Visual Studio 17.12.0 (and thus to the .NET 9 SDK), I am now experiencing false positives for IDE0079 on numerous different analyzer suppressions across my projects.
Below I have a few selected minimal examples. Further down I will list the full list of diagnostic suppressions that I have encountered with false positives for IDE0079.
CA1040:
CA1815:
CA1822:
Diagnostic Id:
IDE0079 is triggered.
This is the full list of analyzer suppressions that I have (thus far) encountered that cause the IDE0079 false positives:
I have also seen a number of analyzers that do not trigger IDE0079 when suppressed, so this does not occur on all suppressions.
Just to be clear, there may well be cases among these analyzers where my way of handling them could be improved as opposed to merely suppressing them; this issue is specifically regarding the false positives for IDE0079 on said suppressions.
Expected Behavior:
IDE0079 does not trigger on suppressions that suppress otherwise active analyzer triggers.
Actual Behavior:
IDE0079 triggers on suppressions that suppress otherwise active analyzer triggers.
The text was updated successfully, but these errors were encountered: