Feature request: Find not used

I am currently refactoring a project with classes that have a portion of public methods that are not used at all.

What I require is an Advanced Find Usages feature that allows me to discover which methods in a class are not used. More like and anti-find feature!

The only way I can find to do this at the moment is to go through the (public) members one by one and do find usages, or a safe delete.

Thinking about it, what would be really powerful is a kind of "clean up class" feature that would simply safe delete all members in a class that are not used in the solution (recursing to also delete member that are only referenced by other members that are candidates for deletion).

I appreciate that this is more relevant to application code, not neccesarily to library code, but I think it could be a very good feature.

Comment actions Permalink

I've done some automation work using a competitive tool that allows me to walk a class file, deleting unused private members and marking Obsolete the unused members that are not private, not part of an interface implementation, etc. Since my little hack was limited (while helpful), I'd love to see something official in R#.

The minimum increment that would be useful to me would involve invoking the search on a given source file, having it list all of the unused members in some tool window, with double-click to get to the member, etc.

Adding onto that, if there could be a solution-wide option I'd be in heaven. :)

Adding onto that, yet again, if this functionality (and its search hits) could be exposed via the OpenAPI I'd then be able to automate all sorts of source code modifications.

Comment actions Permalink

As I remember it, global code analysis was pulled from 3.0, since it was
too memory and CPU intensive.
However, it would be very useful to be able to run it on demand in some later


Please sign in to leave a comment.