6

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..

3
  • Have you tried searching on stackoverflow? Commented Sep 12, 2012 at 12:52
  • @Surendhar For eclipse please have findbug pluging with you. Its really useful. Commented Sep 12, 2012 at 13:01
  • 1
    Have a look a similar question is asked here. stackoverflow.com/questions/7321282/… Commented Sep 12, 2012 at 13:04

8 Answers 8

4

Eclipse provides it as Markers. It will provide all your cases except violating custom naming conventions.

enter image description here

Sign up to request clarification or add additional context in comments.

1 Comment

Will it do naming convention analysis?
3

Findbugs works well as Eclipse plugin, and is easily customizable.

If you're looking for something bigger, or you work in a continous integration environment, I'd go for Sonar.

1 Comment

We use findbugs with TeamCity -- it does integrate with CB environments.
2

FindBugs is probably one of the most prominent ones and well worth a try.

For naming conventions etc, I'd suggest you have a look at CheckStyle.

Comments

2

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

agreed! In combination with findbugs plugin its very usefull and capable of doing many common modification (like fixing imports) all over a project with some clicks.
2

... in addition look at sonar. It's been quiet the eye opener when I first discovered it.

Comments

2

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

1

I use combination of three tools which supplement each other: PMD, Checkstyle and FindBugs.

1 Comment

Either of this do, naming convention analysis?
0

Try Checkstyle (my preference) or PMD.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.