Is it possible to obtain warnings from javadoc when something missed in javadoc-comments?
-
04-07-2019 - |
Question
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)
Solution
Use Checkstyle! It has awesome Ant integration and supports 100s of other important checks to your source code too.
The JavadocType checker is what you'll need though.
OTHER TIPS
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.
We used Doc Check Doclet for an earlier project. It can be integrated with the build and generates useful reports that tell you which code has poor documentation.
NOTE: The tool is beta and no longer supported by Sun.
Yes it is, in Eclipse you have incorporate check for everything what you define, so it is possible to put this missing into "warnings" and than you will e able to see where you make mistakes.