Hi,
The HTML check from JavadocStyle is buggy. It’ll fail for example on:
/**
* An event triggered when a extension is going to be upgraded.
* <p>
* The event also send the following parameters:
* </p>
* <ul>
* <li>source: the related new {@link org.xwiki.extension.LocalExtension} instance</li>
* <li>data: a {@code java.util.Collection<org.xwiki.extension.InstalledExtension>} containing the previous
* {@link org.xwiki.extension.InstalledExtension} instances</li>
* </ul>
*
* @see ExtensionUpgradedEvent
* @see ExtensionUpgradeFailedEvent
* @version $Id: 4a1dfd82bdb9c4447844fb154cc654343aaf934a $
* @since 9.2RC1
*/
Leads to:
15:06:10,967 [INFO] There are 5 errors reported by Checkstyle 9.2 with checkstyle.xml ruleset.
15:06:10,971 [ERROR] src/main/java/org/xwiki/component/util/ReflectionUtils.java:[192,92] (javadoc) JavadocStyle: Unclosed HTML tag found: <A, B> field} would
15:06:10,971 [ERROR] src/main/java/org/xwiki/component/util/ReflectionUtils.java:[204,92] (javadoc) JavadocStyle: Unclosed HTML tag found: <A, B> field} would
15:06:10,972 [ERROR] src/main/java/org/xwiki/component/util/ReflectionUtils.java:[217,91] (javadoc) JavadocStyle: Unclosed HTML tag found: <A, B> field} would
15:06:10,972 [ERROR] src/main/java/org/xwiki/component/util/ReflectionUtils.java:[239,58] (javadoc) JavadocStyle: Unclosed HTML tag found: <A, B>, SomeOtherClass<C>} will return {@code
15:06:10,972 [ERROR] src/main/java/org/xwiki/component/util/ReflectionUtils.java:[266,26] (javadoc) JavadocStyle: Unclosed HTML tag found: <A, B>, SomeOtherClass<C>}.
See:
- JavadocStyle: Don’t validate HTML tags in {@code} blocks · Issue #3351 · checkstyle/checkstyle · GitHub
- checkstyle erroneously detects Javadoc HTML tags inside {@code ...} and {@literal ...} · Issue #1023 · checkstyle/checkstyle · GitHub
Thus I propose to disable this check for now.
See also the discussion at You're invited to talk on Matrix