You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
/var/tmp $ javac TestCheckstyleJavadocSummary.java
/var/tmp $ cat config.xml
<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE module PUBLIC
"-//Checkstyle//DTD Checkstyle Configuration 1.3//EN""https://checkstyle.org/dtds/configuration_1_3.dtd"><module name="Checker"><module name="TreeWalker"><module name="SummaryJavadoc"><property name="period" value="_"/><property name="forbiddenSummaryFragments" value="forbidden-fragment"/></module></module></module>
/var/tmp $ cat TestCheckstyleJavadocSummary.java
public class TestCheckstyleJavadocSummary {
/*** Summary sentence that happens to have a default period. in it, then forbidden-fragment, but the custom period is used_
*/
void foo1() {
}
}
/var/tmp $ RUN_LOCALE="-Duser.language=en -Duser.country=US"
/var/tmp $ java $RUN_LOCALE -jar checkstyle-10.14.2-all.jar -c config.xml TestCheckstyleJavadocSummary.java
Starting audit...
Audit done.
This should fail as the summary sentence contains "forbidden-fragment". It only fails if "forbidden-fragment" occurs before the default period character ".".
This bug was found while addressing the following issue:
I have read check documentation: https://checkstyle.org/checks/javadoc/summaryjavadoc.html
I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
This should fail as the summary sentence contains "forbidden-fragment". It only fails if "forbidden-fragment" occurs before the default period character ".".
This bug was found while addressing the following issue:
While fixing that, I also fixed this.
The text was updated successfully, but these errors were encountered: