Reputation: 6259
Resharper 2016.1 is notify unused public methods. Is there a way to disable this notifications global? I want only disable notification of unused public methods. Unused private methods should be notified nevertheless.
Upvotes: 2
Views: 458
Reputation: 963
I have resharper 2018.1. I don't know if this is version specific but in addition to @citizenmatt's answer you also need to make sure that "Show non-private type members when solution-wide analysis is off" is unchecked on the same options page. You could search for 'solution wide' in top left search of resharper options to quickly get on that page as per the image below.
Upvotes: 0
Reputation: 18573
You'll need to turn off Solution Wide Analysis (ReSharper → Options → Code Inspection Settings). This will disable a number of inspections, but also disable marking public methods as being unused. Alternatively, you can use ReSharper's annotations, and add an attribute such as [PublicAPI]
to the public methods that are used externally.
Private methods will remain marked as unused, because that only requires ReSharper to analyse a single class, rather than the whole solution.
Upvotes: 3