-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Issue #17727: Add regex pattern to forbid lowercase Javadoc beginnins in google_checks.xml #18241
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Issue #17727: Add regex pattern to forbid lowercase Javadoc beginnins in google_checks.xml #18241
Conversation
ba16b22 to
9b3c8ce
Compare
|
@romani, Please look into this PR and review it. Thanks |
|
ping @romani |
romani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thanks a lot !!!
tiny update to make it perfect:
src/main/resources/google_checks.xml
Outdated
| <module name="SummaryJavadoc"> | ||
| <property name="forbiddenSummaryFragments" | ||
| value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )"/> | ||
| value="^@return the *|^This method returns |^A [{]@code [a-zA-Z0-9]+[}]( is a )|^[a-z]"/> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
please make indentation of attribute to be +2 from tag, you have space.
|
@Zopsss , please help to review this PR, I have only minor request. I am good to merge this as soon as it is fixed. |
9b3c8ce to
bc5b36e
Compare
… beginnings in google_checks.xml
bc5b36e to
2b78155
Compare
|
Please rebase to most latest code , CI is red as reminder to you. Please follow. |
romani
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot
Issue: #17727
The default
google_checks.xmlconfiguration does not enforce the Google Style Guide rule that Javadoc summary fragments must start with a capital letter. This leads to false negatives where Javadoc summaries beginning with lowercase letters (for example, "adds an element to the list.") are not marked as violations, even though the Google Style Guide states that summaries should be "capitalized and punctuated as if it were a complete sentence."I added the regex pattern
|^\s*[a-z]to theforbiddenSummaryFragmentsproperty in theSummaryJavadoccheck configuration. This pattern detects Javadoc summaries that start with optional whitespace followed by a lowercase letter, ensuring that lowercase beginnings in Javadoc are marked as violations according to the Google Style Guide.