Parent issue: #19807
Coverage table
Chapter link
Content
Image
Text
Method descriptions begin with a verb phrase.
A method implements an operation, so it usually starts with a verb phrase:
Gets the label of this button. (preferred)
This method gets the label of this button.
Class/interface/field descriptions can omit the subject and simply state the object.
These API often describe things rather than actions or behaviors:
A button label. (preferred)
This field is a button label. (avoid)
Guidelines
These two chapters are covered by SummaryJavadocCheck.
The check has a forbiddenSummaryFragments property, which can be used exactly for these cases, as shown in our example.
Proposal:
| Documentation Comments Rule |
Checkstyle Checks Used |
Sample files |
| Method descriptions begin with a verb phrase |
✅SummaryJavadoc |
|
| Class/interface/field descriptions can omit the subject and simply state the object |
✅SummaryJavadoc |
|

Parent issue: #19807
Coverage table
Chapter link
Content
Image
Text
Method descriptions begin with a verb phrase.
A method implements an operation, so it usually starts with a verb phrase:
Gets the label of this button. (preferred)
This method gets the label of this button.
Class/interface/field descriptions can omit the subject and simply state the object.
These API often describe things rather than actions or behaviors:
A button label. (preferred)
This field is a button label. (avoid)
Guidelines
These two chapters are covered by SummaryJavadocCheck.
The check has a forbiddenSummaryFragments property, which can be used exactly for these cases, as shown in our example.
Proposal: