Closed thijmenketel closed 1 month ago
Import order with intellij plugin causes mvn spotless:check to fail on imports. The intellij plugin formats like this:
mvn spotless:check
import lombok.Builder; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service; import java.time.Duration; import java.time.Instant; import java.time.ZonedDateTime; import java.util.Collection; import java.util.List; import java.util.Optional; import static java.lang.Boolean.TRUE; import static java.time.temporal.ChronoUnit.MINUTES; import static java.util.function.Predicate.not;
While mvn spotless:apply wants it like this:
mvn spotless:apply
import static java.lang.Boolean.TRUE; import static java.time.temporal.ChronoUnit.MINUTES; import static java.util.function.Predicate.not; import java.time.Duration; import java.time.Instant; import java.time.ZonedDateTime; import java.util.Collection; import java.util.List; import java.util.Optional; import lombok.Builder; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Value; import org.springframework.stereotype.Service;
The formatting from the intellij plugin needs match the spotless formatting.
Seems like a duplicate of https://github.com/palantir/palantir-java-format/issues/1088
What happened?
Import order with intellij plugin causes
mvn spotless:check
to fail on imports. The intellij plugin formats like this:While
mvn spotless:apply
wants it like this:What did you want to happen?
The formatting from the intellij plugin needs match the spotless formatting.