-
Notifications
You must be signed in to change notification settings - Fork 124
Open
Labels
Milestone
Description
SpringJavadocCheck currently rejects any @return statement that begins with a capital letter.
Lines 149 to 162 in 4286438
| private void checkTagCase(DetailAST ast, TextBlock javadoc) { | |
| String[] text = javadoc.getText(); | |
| for (int i = 0; i < text.length; i++) { | |
| for (Pattern pattern : CASE_CHECKED_TAG_PATTERNS) { | |
| Matcher matcher = pattern.matcher(text[i]); | |
| if (matcher.find()) { | |
| String description = matcher.group(1).trim(); | |
| if (startsWithUppercase(description)) { | |
| log(javadoc.getStartLineNo() + i, text[i].length() - description.length(), "javadoc.badCase"); | |
| } | |
| } | |
| } | |
| } | |
| } |
However, it is sometimes useful to be able to begin the statement with an acronym such as "HTML", "URL", "JNDI", "JNI", etc.
In Spring Framework, I recently changed Javadoc from@return jni hints to @return JNI hints, and that caused the build to fail.
To address that, I had to suppress SpringJavadocCheck for the entire affected class.
Thus, it would be nice if checkTagCase() allowed the first "word" to be all-caps (i.e., and acronym).
Reactions are currently unavailable