Skip to content

Add checks for OpenJDK Style §3.4.1 - Order of Constructors and Overloaded Methods #19805

@Aman-Baliyan

Description

@Aman-Baliyan

Parent issue: #19798

Image

Description

Add Checkstyle checks for all rules under §3.4.1 - Order of Constructors and Overloaded Methods of the OpenJDK Java Style Guidelines v6.

Rules covered

From §3.4.1 - Order of Constructors and Overloaded Methods:

1.Constructors and overloaded methods should be grouped together by functionality and ordered with increasing arity. This implies that delegation among these constructs flow downward in the code - No check present
2.Constructors and overloaded methods should not be split apart by other members - OverloadMethodsDeclarationOrder and ConstructorsDeclarationGrouping

Checks to add to openjdk_checks.xml

TreeWalker-level:

<module name="OverloadMethodsDeclarationOrder"/>
<module name="ConstructorsDeclarationGrouping"/>

Progress tracker

Check Rule PR
None Overloaded Method and constructors ordered with increasing arity
OverloadMethodsDeclarationOrder Overloaded method should not split apart by other members
ConstructorsDeclarationGrouping Constructors should not split apart by other members

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions