Javadoc problems inspection should allow newline after @see

Answered

When a Javadoc `@see` tag cites a long URL or symbol, a Java code formatter might insert a newline between the tag and the link, as in:

/**
* @see
* com.ibm.wala.shrike.shrikeBT.IInstruction.Visitor#visitArrayLength(ArrayLengthInstruction)
*/

Unfortunately, the «Java → Javadoc → Declaration has Javadoc problems» inspection marks each of these as a problem, reporting that “Class/method reference, quoted text, or HTML link are expected after `@see` tag.”

Manually removing the break is not helpful if a project uses automated reformatting tools that will just put the break back again. For example, the widely-used Google Java formatting tools (re)introduce such line breaks. Thus, one is left with no choice but to disable (or reduce the severity) of this entire inspection. That’s unfortunate, because this inspection checks for many other useful things.

The «Java → Javadoc → Declaration has Javadoc problems» should be refined to silently allow a line break between the `@see` tag and the “class/method reference, quoted text, or HTML link” that is expected to follow.

0
2 comments

Created bug request for that: https://youtrack.jetbrains.com/issue/IDEA-280553

Please follow it for updates. 

0
Avatar
Permanently deleted user

Excellent. Thank you, Konstantin!

0

Please sign in to leave a comment.