Skip to content

Files

Latest commit

 

History

History
44 lines (35 loc) · 1.17 KB

JavadocEmptySeeTag.md

File metadata and controls

44 lines (35 loc) · 1.17 KB

Pattern: Empty @see tag

Issue: -

Description

Checks for empty @see tags within javadoc. Known limitation: Only the first occurrence of an empty @see within a javadoc comment is found.

Example of violations:

/**
 * Sample class
 *
 * @see                                                         // violation
 */
class MyClass {

    /**
     * Return the calculated count of some stuff,
     * starting with the specified startIndex.
     *
     * @param startIndex - the starting index
     * @return the full count
     * @throws RuntimeException
     *     @see                                                 // violation
     *
     * NOTE: Only the first occurrence of an empty @see tag
     *       within a javadoc comment is found, so the
     *       following line is not flagged as a violation!!!
     * @see
     */
    int countThings(int startIndex) { }

    /**
     *@see                                                      // violation
     */
    String name = 'joe'
}

Further Reading