I am using checkstyle in my codebase, http://checkstyle.sourceforge.net/, and I am having a question regarding JAVADOC.
I have static functions like this:
**
* @param id
*/
public static void getName(final String id) {
}
where checkstyle complains about
Expected @param tag for ‘id’
When I give a description like
@param id id
then it works fine, but I do not want to give a description for each param and return. Is there any alternative to fix this?
You are right – this warning means that you don’t have a description of a parameter. If you don’t want to describe the parameter why bother mentioning it? Your current JavaDoc is pointless and only occupies priceless editor space.
Either remove the parameter completely from the JavaDoc (I guess it’s meaning is obvious from the context) or document it properly. And
is not a proper documentation.