Skip to content

doc-asterisk

Javastyleno fixdefault: offjava/google

Reports a line of a Javadoc comment, after the first, that does not start with an asterisk. Empty lines are not reported.

Javadoc strips the leading * of each line, so a line without one is kept with its indentation, and the comment renders differently from how it reads in the source. The asterisks also show where the comment ends.

To fix, start the line with *.

Reported
...
*/
class A {
/**
No star here.
* Star again.
*/
...
java:
lint:
rules:
doc-asterisk: warn # off (default), warn, error

Enabled by the presets: java/google.

Suppress one line with sudsy-disable-next-line doc-asterisk in a comment of the file’s language.

The same check in other tools; Sudsy reports what each upstream rule reports.

Tool Rule Match
checkstyle JavadocMissingLeadingAsterisk full