#667 JavadocStyle checkHTML bad Extra HTML tag found errors

release_1.0
open
Oliver Burn
5
2014-02-15
2012-01-04
Daniel Holmes
No

Example, this java doc

    /**
     * A constraint to bound the option values between 0 and 100.
     * <p>
     * <font color="red">NOTE:</font> Not all the options expressed as percentage,
     * require this restriction.
     * </p>
     *
     */

generates this error
Extra HTML tag found: font Not all the options expressed as percentage

Discussion

  • Patrick Tucker
    Patrick Tucker
    2014-01-03

    I also get this error when using a dd or dt element. For some reason checkstyle thinks these elements must not be closed.

    The following elements should be considered valid:
    <dt>title</dt>
    <dd>definition</dd>

     
  • Patrick Tucker
    Patrick Tucker
    2014-01-03

    The errors being:
    Extra HTML tag found: </dd>
    Extra HTML tag found: </dt>

     
    Last edit: Patrick Tucker 2014-01-04
  • Roman Ivanov
    Roman Ivanov
    2014-02-06

    • labels: Core Framework --> Core Framework, JavaDoc
    • Group: --> release_1.0
     
  • Roman Ivanov
    Roman Ivanov
    2014-02-09

    please read https://groups.google.com/forum/#!topic/checkstyle/VEVFDsZKLzg if you still interested in fixing this issue

     
    • john
      john
      2014-02-15

      Roman, it would be nice to get the "dd" and "dt" tags place in the ALLOWED_TAGS list in the JavadocStyleCheck class. The problem Patrick mentions is due to the fact that the tags show in the SINGLE_TAGS list but not the ALLOWED_TAGS list.

      This would be helpful for people still developing on java 1.6 or 1.7 and don't have plans of moving complex systems to 1.8 right away.

       
  • Patrick Tucker
    Patrick Tucker
    2014-02-09

    Isn't the fix for my issue as simple as moving the tag from a single tag to a normal tag?

     
  • Roman Ivanov
    Roman Ivanov
    2014-02-15

    Hi John and Patric, thanks for persistence, if you know how to fix problem please do not hesitate with pull requests
    https://github.com/checkstyle/checkstyle/pull/109

    John, Checkstyle JavaDoc and Java8 completely separate features that we need to implement. Even we got Java8 support, Checkstyle will continue to validate your java7 and java6, and .... code.
    BTW, we plan to switch Checkstyle to Java7 in next release (https://groups.google.com/forum/#!topic/checkstyle-devel/nd8rWCtJ7Tg).

     
  • Roman Ivanov
    Roman Ivanov
    2014-02-15

    • Description has changed:

    Diff:

    --- old
    +++ new
    @@ -1,4 +1,6 @@
     Example, this java doc
    +
    +~~~~~~
         /**
          * A constraint to bound the option values between 0 and 100.
          * <p>
    @@ -7,7 +9,8 @@
          * </p>
          *
          */
    +~~~~~~
    
     generates this error
    -Extra HTML tag found: </font> Not all the options expressed as percentage
    +Extra HTML tag found: font Not all the options expressed as percentage