问题
I suppressed a Resharper warning in a VB.NET class file (*.vb). As expected, the warning is not highlighted at the border of the text editor.
If I show all Resharper warnings for my project I would expect that the suppressed warning is neither shown in the Inspection Results view. However, it is shown, see screen shot.
How to I hide warnings in the InspectionResults that are suppressed in the code with an annotation?
I am using Resharper 8.2.3
(If you have issues with public properties in respect to xaml bindings also see this related question: Resharper says OnPropertyChange set member can be private while not true)
回答1:
This appears to be a bug in ReSharper. It works as expected (that is, the suppressed warning does not appear in the find results) if you use the disable and restore style comments, rather than the disable once comments. I.e.:
' ReSharper disable MemberCanBePrivate.Global
Public Property Foo As String
' ReSharper restore MemberCanBePrivate.Global
I've raised an issue that you can track and vote on: https://youtrack.jetbrains.com/issue/RSRP-444615
来源:https://stackoverflow.com/questions/31291549/resharper-how-to-hide-suppressed-warnings-in-inspection-results