Skip to content
New issue

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

Improve indentation of switch cases #336

Closed
wilkinsona opened this issue Jun 23, 2022 · 0 comments
Closed

Improve indentation of switch cases #336

wilkinsona opened this issue Jun 23, 2022 · 0 comments
Assignees
Milestone

Comments

@wilkinsona
Copy link
Contributor

See spring-projects/spring-boot#28180.

We'd like this:

return switch (getErrorProperties().getIncludeBindingErrors()) {
case ALWAYS -> true;
case ON_PARAM -> getErrorsParameter(request);
default -> false;
};

To be formatted like this:

return switch (getErrorProperties().getIncludeBindingErrors()) {
     case ALWAYS -> true;
     case ON_PARAM -> getErrorsParameter(request);
     default -> false;
};

Similarly, we'd like this:

switch (getErrorProperties().getIncludeBindingErrors()) {
case ALWAYS:
    return true;
case ON_PARAM:
    return getErrorsParameter(request);
default:
    return false;
}

To be formatted like this:

switch (getErrorProperties().getIncludeBindingErrors()) {
    case ALWAYS:
        return true;
    case ON_PARAM:
        return getErrorsParameter(request);
    default:
        return false;
}
@wilkinsona wilkinsona added this to the 0.0.34 milestone Jun 23, 2022
@wilkinsona wilkinsona self-assigned this Jun 23, 2022
sbrannen added a commit to sbrannen/spring-framework that referenced this issue Jun 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant