How to easily find unused private methods, classes and variables in the entire project?
Similar to ↓
, it means that the class is not referenced anywhere. At this time, such a class remains in our project, taking up space in vain, slowing down the startup speed, and increasing the cost of reading code.
How to easily and quickly capture these useless codes at one time?
Here is a very simple way: ↓
Step 1: First find the code —> inspect Code
My idea here is the 2021.3 version of the mac system
Step 2:
Select the whole project, and then click ok
to scan the code in the entire project
Step 3:
At this point, you can see useless methods in Unused declaration