-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Issue #14689: Fix Javadoc summary period handling
- Loading branch information
1 parent
2d172f3
commit aed2143
Showing
11 changed files
with
212 additions
and
59 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
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
28 changes: 28 additions & 0 deletions
28
...e/checks/javadoc/summaryjavadoc/InputSummaryJavadocForbiddenFragmentRelativeToPeriod.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,28 @@ | ||
/* | ||
SummaryJavadoc | ||
violateExecutionOnNonTightHtml = (default)false | ||
forbiddenSummaryFragments = ^$|fail-summary-fragment | ||
period = 。 | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.javadoc.summaryjavadoc; | ||
|
||
public class InputSummaryJavadocForbiddenFragmentRelativeToPeriod { | ||
|
||
/** | ||
* Summary sentence on its own line。 | ||
* <p> | ||
* Another sentence that is not part of the summary, | ||
* so this should not matter: fail-summary-fragment。 | ||
*/ | ||
void foo1() {} | ||
|
||
// violation below 'Forbidden summary fragment.' | ||
/** | ||
* Summary sentence containing default period mentioning version 1.1, then ending with correct | ||
* period after disallowed words, fail-summary-fragment。 | ||
*/ | ||
void foo2() {} | ||
} |
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
24 changes: 24 additions & 0 deletions
24
...awl/tools/checkstyle/checks/javadoc/summaryjavadoc/InputSummaryJavadocJapanesePeriod.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,24 @@ | ||
/* | ||
SummaryJavadoc | ||
violateExecutionOnNonTightHtml = (default)false | ||
forbiddenSummaryFragments = (default)^$ | ||
period = 。 | ||
*/ | ||
|
||
package com.puppycrawl.tools.checkstyle.checks.javadoc.summaryjavadoc; | ||
|
||
public class InputSummaryJavadocJapanesePeriod { | ||
|
||
/** | ||
* Summary sentence ending with correct period and no following whitespace。The Japanese | ||
* period has whitespace built in! | ||
*/ | ||
void foo1() {} | ||
|
||
/** | ||
* 要約文。別の文。 | ||
*/ | ||
void foo2() {} | ||
} |
Oops, something went wrong.