doc-paragraph
What it does
Section titled “What it does”Reports Javadoc paragraphs that do not use <p> in the usual way: a <p> must stand right before the first word of its paragraph (no space after it) and after an empty line, an empty line between paragraphs must be followed by <p>, and the comment must not start with <p>. Text inside <pre>, <ul> and the like, and after the first block tag, is not checked.
Why it matters
Section titled “Why it matters”Javadoc ignores empty lines, so paragraphs not marked with <p> run together in the generated page. A <p> that is misplaced adds an empty paragraph or starts a paragraph in the wrong place.
To fix, put <p> directly before the first word of each paragraph after the first.
Example
Section titled “Example”... * * <p>Fine paragraph. * * <p> Space after. * * Missing tag. * <p>Not after an empty line. * * <ul> * <li>item... * after the tags */class A { /** <p>First thing. */ void f() {}}Configuration
Section titled “Configuration”java: lint: rules: doc-paragraph: warn # off (default), warn, errorEnabled by the presets: java/google.
Suppress one line with sudsy-disable-next-line doc-paragraph in a comment of the file’s language.
Upstream equivalents
Section titled “Upstream equivalents”The same check in other tools. full: Sudsy reports what the upstream rule reports; partial: only part of it, as the last column says.
| Tool | Rule | Match | What differs |
|---|---|---|---|
| checkstyle | JavadocParagraph |
partial | <p> and empty-line placement; not allowNewlineParagraph. |