Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to obtain warnings from javadoc when something missed in javadoc-comments?

Accidentally I may forget to describe some parameters or exception throwing (or something else) when documenting methods or classes, etc.

Is it possible to run javadoc in such a way that it warns me about missing documentation items?

(I use ant script for generating documentation)

like image 743
sergtk Avatar asked Oct 26 '08 19:10

sergtk


People also ask

What do Javadoc comments do?

In general, Javadoc comments are any multi-line comments (" /** ... */ ") that are placed before class, field, or method declarations. They must begin with a slash and two stars, and they can include special tags to describe characteristics like method parameters or return values.

Under what circumstances should you not include a @return tag in a method comment?

Omit @return for methods that return void and for constructors; include it for all other methods, even if its content is entirely redundant with the method description. Having an explicit @return tag makes it easier for someone to find the return value quickly.


1 Answers

I do not know of any javadoc option that will issue a warning about non-documented items.

However, if You happen to use Eclipse, take a look at the settings in

Window -> Preferences -> Java -> Compiler -> Javadoc

There, You can tell Eclipse to issue warnings on undocumented items.

like image 158
Black Avatar answered Sep 18 '22 11:09

Black