How to use IntelliJ IDEA to find all unused code?

Deadly 提交于 2019-11-27 05:56:25
CrazyCoder

Just use Analyze | Inspect Code with appropriate inspection enabled (Unused declaration under Declaration redundancy group).

Using IntelliJ 11 CE you can now "Analyze | Run Inspection by Name ... | Unused declaration"

In latest IntelliJ versions, you should run it from Analyze->Run Inspection By Name:

Than, pick Unused declaration:

And finally, uncheck the Include test sources:

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!