Issue #19755: Added checks for OpenJDK Style §4.3 - Method Names#19762
Merged
Conversation
d706fea to
3f16cd2
Compare
Contributor
Author
|
@vivek-0509 @romani please review |
Contributor
Author
|
@romani please review |
romani
requested changes
Apr 30, 2026
| <td>???</td> | ||
| <td/> | ||
| <td> | ||
| <span class="wrapper inline"> |
Member
There was a problem hiding this comment.
Ply mention here that Method names should typically be verbs or other descriptions of actions. can not be covered as checkstyle do not have English vocabular to make sure it is verb or verb starting name.
Coverage should be blue color, as coverage is not complete.
3f16cd2 to
ed2b70c
Compare
Contributor
Author
|
@romani please review the changes |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #19755
Changes
[openjdk_checks.xml]: Added MethodName module with format pattern ^[a-z]{2,}[a-zA-Z0-9]*$
Integration Tests: Created new test class MethodNameTest.java with:
Valid cases: is(), go(), getName(), doSomething()
Invalid cases: a() (single char), _do() (underscore prefix), BadName() (uppercase start), bad_name() (underscores)
Documentation: Updated openjdk_style.xml coverage table and added OpenJDK links to MethodName check documentation
Pattern Details
✅ Allowed: Method names starting with 2+ lowercase letters, followed by any letters/digits
❌ Not Allowed: Single-letter names, uppercase start, underscores, starting digits