Ok, right now if the request came from UnusedMethods then the assumption is that each method declaration does not have any invocations. This is totally different if the request came from the user (e.g., delete method A). In such a scenario, the RemoveUnusedMethod should handle look for invocations of such method. If found it should abort the deletion and return an error saying cannot be deleted, this method is currently used somewhere in the code.
This will be the same for other strategies such as RemoveUnusedTypes, RemoveUnusedField, etc.
Ok, right now if the request came from UnusedMethods then the assumption is that each method declaration does not have any invocations. This is totally different if the request came from the user (e.g., delete method A). In such a scenario, the RemoveUnusedMethod should handle look for invocations of such method. If found it should abort the deletion and return an error saying cannot be deleted, this method is currently used somewhere in the code.
This will be the same for other strategies such as RemoveUnusedTypes, RemoveUnusedField, etc.