Skip to content

doc-tag-indent

Javastyleno fixdefault: offjava/google

Reports a line that continues a block tag (@param x) and is indented by fewer than indent blanks after the asterisk (5 by default). Lines that start HTML and lines inside <pre> and the like are not reported.

The indent shows that a line belongs to the tag above it: without it a long @param description reads as a paragraph of the comment.

To fix, indent the continuation lines.

Reported
...
* Summary.
*
* @param a first
* continued with one blank
* @param b first
* continued with five blanks
* @param c first
* four blanks are not enough
* @return x
* <pre>
* html is left alone
...
java:
lint:
rules:
doc-tag-indent:
level: warn # off (default), warn, error
options:
indent: 5
Option Type Default Description
indent int 5 Blanks after the asterisk that a continuation line needs.

Enabled by the presets: java/google.

Suppress one line with sudsy-disable-next-line doc-tag-indent 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 JavadocTagContinuationIndentation full