forked from checkstyle/checkstyle
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue checkstyle#3311: Added method doesCheckAcceptJavadocWithUnclose…
…dHtmlTag in AbstractJavadocCheck which can be overridden in extending checks which are not to process javadoc with unclosed HTML tags
- Loading branch information
Showing
6 changed files
with
366 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 42 additions & 0 deletions
42
...rces/com/puppycrawl/tools/checkstyle/checks/javadoc/abstractjavadoc/InputUnclosedTag.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
package com.puppycrawl.tools.checkstyle.checks.javadoc.abstractjavadoc; | ||
|
||
/** | ||
* <body> | ||
* <p> This class is only meant for testing. </p> | ||
* <p> In html, closing all tags is not necessary. | ||
* <li> neither is opening every tag <p> </li> | ||
* </body> | ||
* | ||
* @see "https://www.w3.org/TR/html51/syntax.html#optional-start-and-end-tags" | ||
*/ | ||
public class InputUnclosedTag { | ||
/** <p> <p> paraception </p> </p> */ | ||
int field1; | ||
|
||
/**<li> paraTags should be opened</p> list isn't nested in parse tree </li>*/ | ||
int field2; | ||
|
||
/** | ||
* <body> body <p> paragraph <li> list </li> </p> </body> | ||
* | ||
* @return <li> <li> outer list isn't nested in parse tree </li> </li> | ||
*/ | ||
int getField1() {return field1;} | ||
|
||
/***/ | ||
int getField2() {return field2;} //method with empty javadoc | ||
|
||
/** | ||
* <tr> <li> list is not going to be nested in parse tree </tr> | ||
* | ||
* @param field1 {@code <p> paraTag will not be recognized} in javadoc tree </p> | ||
*/ | ||
void setField1(int field1) {this.field1 = field1;} | ||
|
||
/** | ||
* <p>This is a setter method. | ||
* And paraTag shall be nested in parse tree </p> | ||
* @param field2 <p> settter | ||
*/ | ||
void setField2(int field2) {this.field2 = field2;} | ||
} |
Oops, something went wrong.