We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When having many values covered by the same case, google-java-format does a terrible job formatting the code. Example:
public class GoogleJavaFormatFail { public String myMethod(final TestEnum testEnum) { return switch (testEnum) { case SOME_RATHER_LONG_NAME_1, SOME_RATHER_LONG_NAME_2, SOME_RATHER_LONG_NAME_3, SOME_RATHER_LONG_NAME_4, SOME_RATHER_LONG_NAME_5, SOME_RATHER_LONG_NAME_6, SOME_RATHER_LONG_NAME_7 -> "less than" + " number" + " 7"; case SOME_RATHER_LONG_NAME_8 -> "number 8"; }; } public enum TestEnum { SOME_RATHER_LONG_NAME_1, SOME_RATHER_LONG_NAME_2, SOME_RATHER_LONG_NAME_3, SOME_RATHER_LONG_NAME_4, SOME_RATHER_LONG_NAME_5, SOME_RATHER_LONG_NAME_6, SOME_RATHER_LONG_NAME_7, SOME_RATHER_LONG_NAME_8 } }
This is a little sad, as the new switch statements are awesome for compile time type safety (make sure no case is missed).
The text was updated successfully, but these errors were encountered:
72672b0
Successfully merging a pull request may close this issue.
When having many values covered by the same case, google-java-format does a terrible job formatting the code. Example:
This is a little sad, as the new switch statements are awesome for compile time type safety (make sure no case is missed).
The text was updated successfully, but these errors were encountered: