-
Notifications
You must be signed in to change notification settings - Fork 48
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
Feature Request: Indent Record
constructor to be 4
spaces instead of 8
#1012
Comments
Based on my investigation, it looks like in this line https://github.com/palantir/palantir-java-format/blob/e7abbb0435ec1bbdbcc8fc9ead8ea826fefc3ecc/palantir-java-format/src/main/java/com/palantir/javaformat/java/ImportOrderer.java#L29C1-L29C52, we are utilizing existing tokens. However, /**
* {@link TokenKind}s that indicate the start of a type definition. We use this to avoid scanning the whole file,
* since we know that imports must precede any type definition.
*/
private static final ImmutableSet<TokenKind> CLASS_START =
ImmutableSet.of(TokenKind.CLASS, TokenKind.INTERFACE, TokenKind.ENUM);
/**
* We use this set to find the first import, and again to check that there are no imports after the place we stopped
* gathering them. An annotation definition ({@code @interface}) is two tokens, the second which is
* {@code interface}, so we don't need a separate entry for that.
*/
private static final ImmutableSet<String> IMPORT_OR_CLASS_START =
ImmutableSet.of("import", "class", "interface", "enum"); The formatting for I am happy to contribute to this to include at least |
Probably relates to the follow code chunk as well Lines 163 to 217 in e7abbb0
|
What happened?
Related issue: #1007
What did you want to happen?
The formatter should indent
Record
constructor to be4
spaces instead of8
The text was updated successfully, but these errors were encountered: