Resharper: How to hide suppressed warnings in Insp

2019-05-29 20:53发布

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)

Resharper InspectionResult screenshot

1条回答
够拽才男人
2楼-- · 2019-05-29 21:35

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

查看更多
登录 后发表回答