You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
docs: Google style coverage page missing sample example for 3.4.2.1 Overloads: never split #21447
Methods of a class that share the same name appear in a single contiguous group with no other members in between. The same applies to multiple constructors. This rule applies even when modifiers such as static or private differ between the methods or constructors.
atharv@atharv-IdeaPad-3-15IIL05:~/test$catTest.java/** Some javadoc. */publicclassTest {
/** Some javadoc. */publicTest() {}
privatevoidfoo() {}
privateTest(intx) {}
staticvoidfoo(intx) {}
/** Some javadoc. */publicTest(Strings) {}
/** Some javadoc. */publicvoidfoo(doubled) {}
}
atharv@atharv-IdeaPad-3-15IIL05:~/test$ java -jar checkstyle-14.1.0-all.jar -c /google_checks.xml Test.java
Starting audit...
[WARN] /home/atharv/test/Test.java:9:3: Constructors should be grouped together. The last grouped constructor is declared at line '5'. [ConstructorsDeclarationGrouping]
[WARN] /home/atharv/test/Test.java:11:3: All overloaded methods should be placed next to each other. Previous overloaded method located at line '7'. [OverloadMethodsDeclarationOrder]
[WARN] /home/atharv/test/Test.java:14:3: Constructors should be grouped together. The last grouped constructor is declared at line '5'. [ConstructorsDeclarationGrouping]
[WARN] /home/atharv/test/Test.java:17:3: All overloaded methods should be placed next to each other. Previous overloaded method located at line '11'. [OverloadMethodsDeclarationOrder]
Audit done.
Activity
Atharv3221 commentedon Sep 4, 2026
@NianJiuZst please work on another issue this is project related
Atharv3221 commentedon Sep 4, 2026
I am working on it
Issue checkstyle#21447: add missing sample for 3.4.2.1 google_checks
Issue #21447: add missing sample for 3.4.2.1 google_checks