开发者

Something like unnecessary code detector for NetBeans

NetBeans is by default better than Eclipse (imho)开发者_如何学C in detecting code smells, but the Unnecessary Code Detector for Eclipse seems to find more dead code and code that should be improved. Is there something comparable for NetBeans or is there a Maven plug-in?


Not a direct answer to your question, but this might be interesting: Here is a set of plugins for NetBeans to integrate tools like FindBugs, PMD and CheckStyle into NetBeans.

Those tools are static code analysis tools: they look at your source code and give you information about possible error-prone constructs, possible bugs etc. and can most likely also find unused code.


Take a look at this plugin: dead code detector.

It is a sort of proof-of-concept plugin build on Emeric Vernat's DCD project.

ps. there is also a feature request [Bug 181458] on which you can vote to get this feature in Netbeans out-of-the-box :-)


The ucdetector is strictly limited to eclipse and can't be used in a different environment. So if you wanted to use it, you'd have to install a basic eclipse somewhere with projects pointing to your source directories and use it for unused code detection only.

Another way to identify unused code is instrumenting the (live) application, run it for a while and analyse the logs. Usual tools are Emma, Cobertura, and Clover.


Couldn't resist - detecting code smells with eclipse...

  • Checkstyle plugin for eclipse
  • PMD integration for eclipse
  • findbugs integration for eclipse
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜