In our code base, i see a lot of methods like there:
/**
* @param tagID
* @param startDate
* @param endDate
* @param estimated
* @return
* @throws ServerException
*/
List<String> generateMaster(int tagID, Date date)
throws ServerException, BusinessException;
Though there is a javadoc present, the description of method is missing. Hence the javadoc is plainly useless. In checkstyle, what do i do so that it gives a warning for above cases.
<property name="allowMissingJavadoc" value="false"/>
This only checks if at all there is a javadoc present or not. It marks the above method as present
as the javadoc is present. But the method declaration is actually missing.
PS: Tagging eclipse and intellij. I am happy with any solution which tells me the number of methods containing above like javadocs
It may be too late for this post - but anyone else looking to find answer, add description to each element e.g.
/**
* @param tagID - ID of the tag
* @param startDate - Starting Date
* @param endDate - End date
* @param estimated <-- this is not the param - should be removed or fix doc
* @return <-- missing return param and description
* @throws ServerException -- throws server exception
*/
We use this for javadocs in checkstyle:
<module name="JavadocStyle">
<property name="severity" value="warning"/
<property name="checkEmptyJavadoc" value="true"/>
</module>
As you see checkEmptyJavadoc
should help you.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With