I am looking for eclipse/netbeans plugin or a tool, which analysis java project, and give us a report of unused imports, unused variables, unused methods, violating custom naming conventions, etc..
-
Have you tried searching on stackoverflow?Kai– Kai2012-09-12 12:52:26 +00:00Commented Sep 12, 2012 at 12:52
-
@Surendhar For eclipse please have findbug pluging with you. Its really useful.amod– amod2012-09-12 13:01:08 +00:00Commented Sep 12, 2012 at 13:01
-
1Have a look a similar question is asked here. stackoverflow.com/questions/7321282/…amod– amod2012-09-12 13:04:37 +00:00Commented Sep 12, 2012 at 13:04
8 Answers
Eclipse provides it as Markers. It will provide all your cases except violating custom naming conventions.

1 Comment
Netbeans 7.2 has a new Inspect feature: goto Source|Inspect from the menu. It certainly has most of the tests for mentioned in your question.
1 Comment
... in addition look at sonar. It's been quiet the eye opener when I first discovered it.
Comments
For the little things like naming conventions and imports, I agree with the other answers that PMD is a pretty good choice.
[shameless plug] This may be overkill, but there's a tool called "Codefacts" that the company that I work at developed, which will analyze your code from a git or svn repository. It runs metrics and stuff to assess code quality. It might fit into your "etc.."
I can't recall all of the metrics it uses, but some of them are things like comment/code ratio, documentation coverage, checking if a lot of your methods/classes are too long, and a bunch more. Codefacts can be downloaded here [/shameless plug]
Comments
I use combination of three tools which supplement each other: PMD, Checkstyle and FindBugs.