$ cat InputTry.java
/** Test... */
public class InputTry {
/** Test... */
public static void main(String[] args) {
int input = 0;
switch (input) {
case 1:
case 2:
System.out.println("sout");
break;
case 3:
System.out.println("sout");
break;
default:
System.out.println("sout");
}
}
}
$ java -jar checkstyle-10.25.0-all.jar -c google_checks.xml InputTry.java
Starting audit...
Audit done.
from #17165 (comment)
I have downloaded the latest cli from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
https://google.github.io/styleguide/javaguide.html#s4.8.4-switch