palantir / palantir-java-format

A modern, lambda-friendly, 120 character Java formatter.
Apache License 2.0
403 stars 43 forks source link

Bad formatting for empty enum #1066

Open lhhong opened 3 months ago

lhhong commented 3 months ago

What happened?

The following

public enum EmptyEnum {
    // Some comment required to repro
    ;

    public static void someMethod() {}
}

gets formatted to

public enum EmptyEnum {
// Some comment required to repro
;

    public static void someMethod() {}
}

What did you want to happen?

Expect the original formatting to be the right way.