Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Ensuring source code is up to scratch

 
David Abramowicz
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All!

I am getting close to submitting the assignment, and I was wondering if anyone can recommend some nifty tool, or if it is possible with the Java SDK to:

- Ensure that all parameters, return, and throws statements have associated JavaDoc
- Ensure that there all variables, methods and classes are actually utilised.

How did you guys perform your final review of the source code before submit?

Thanks in advance

Cheers /Dave
 
Frans Janssen
Ranch Hand
Posts: 357
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Dave,

- Ensure that all parameters, return, and throws statements have associated JavaDoc


I just generated the javadoc and clicked my way through all files to see that they all have non-empty descriptions. Javadoc will issue warnings when the Javadoc for a member does not match the declaration, but won't inform you of Javadoc missing altogether.


- Ensure that there all variables, methods and classes are actually utilised.


I used JBuilder to edit the code, which marks private members that are not used (statically). You can download a free version at the borland web site, but you will still will have to scan through all your source files.
IIRC Eclipse has a similar capability.

You can also use the Emma coverage testing package to check that all your code is actually (dynamically) used. Sadly, I never managed to get it to run in combination with RMI. (But it must have been me, because others have reported here that they could.)

Frans.
[ February 18, 2005: Message edited by: Frans Janssen ]
 
peter wooster
Ranch Hand
Posts: 1033
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use Checkstyle and Emma to perform these tasks. I had no trouble getting Emma to work with RMI.
 
dennis du
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I use Jbuilder 2005 for the codeStyle check.
Which contains a Java Standard codeStyle.
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Eclipse is an excellent IDE that could perform code check style and much more. There is a learning curve however, but it will pay off latter (it is becoming an industry standard and more an more companies require developers that are familiar with the tool).
 
David Abramowicz
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks guys...

I'm into eclipse, so using Checkclipse (checkstyle plugin for Eclipse). Having a bit of trouble configuring it, but it basically does the job.

/Dave
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic