-
Notifications
You must be signed in to change notification settings - Fork 4k
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
False Positive Warning for IDE0079 Remove Unneccessary Suppression #47288
Comments
This is by design, and the analyzer has a configurable option to skip specific diagnostic IDs from analysis. You can specify the following in your .editorconfig file:
[*.cs]
dotnet_remove_unnecessary_suppression_exclusions = ID1, ID2 Basically, your options are:
|
Not really - suppress message attributes are meant for suppressing analyzer diagnostics. Any third party component that uses the same suppression mechanisms for suppressing their own custom reported issues is relying on an unsupported suppression mechanism. Adding such a custom exclusion for a specific category used by a particular third party extension is not scalable, as there could be numerous different extensions using their own category that would then request the same. |
Tag @sharwell to bring this up for IDE design meeting review, I have marked this tentatively as by design. |
During this weeks design review it was decided to move forward on a proposal to implement category exclusion for these diagnostics in a manner akin to the |
…ression analyzer Fixes dotnet#47288
After #47819 is merged, you should be able to exclude entire category by setting the below editorconfig option: [*.cs]
dotnet_remove_unnecessary_suppression_exclusions = category: ReSharper |
I think this not happening only for resharper's rules [SuppressMessage("Microsoft.Maintainability", "CA1506", Justification = "By Design")] is marked as unneessary but when removed, build detects these errors |
@drvic10k Can you file a new issue for that? It sounds like an unrelated issue. |
This issue has been moved from a ticket on Developer Community.
[severity:I'm somewhat annoyed. A fix would be nice] [regression] [worked-in:16.7]
I use the SuppressMessageAttribute to suppress certain Resharper warnings. Visual Studio 2019 16.8.0 preview 2 is incorrectly suggesting that these attributes can be removed because they are not used. In fact, they are being used by Resharper.
[SuppressMessage("ReSharper", "UnusedMember.Global", Justification = "For future use.")]
Would it be possible to check the category and not step on Resharper's SuppressMessage attributes?
Original Comments
Feedback Bot on 8/30/2020, 08:05 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: