Prettier-Java 0.6.0
# Options (if any):
--print-width 120
It looks like #632 , despite being a great improvement overall, introduced a regression when the first method call needs to be multi-line due to long arguments, leading to a closing ) misaligned.
Input:
public static final MethodDescriptor<ByteBuf, ByteBuf> NEW_TUNNEL_METHOD = MethodDescriptor
.newBuilder(ByteBufMarshaller.INSTANCE, ByteBufMarshaller.INSTANCE)
.setFullMethodName(TUNNEL_SERVICE + "/new")
.setType(MethodDescriptor.MethodType.BIDI_STREAMING)
.build();
Output:
public static final MethodDescriptor<ByteBuf, ByteBuf> NEW_TUNNEL_METHOD = MethodDescriptor.newBuilder(
ByteBufMarshaller.INSTANCE,
ByteBufMarshaller.INSTANCE
)
.setFullMethodName(TUNNEL_SERVICE + "/new")
.setType(MethodDescriptor.MethodType.BIDI_STREAMING)
.build();
Expected behavior:
public static final MethodDescriptor<ByteBuf, ByteBuf> NEW_TUNNEL_METHOD = MethodDescriptor
.newBuilder(ByteBufMarshaller.INSTANCE, ByteBufMarshaller.INSTANCE)
.setFullMethodName(TUNNEL_SERVICE + "/new")
.setType(MethodDescriptor.MethodType.BIDI_STREAMING)
.build();
Alternative expected behavior:
public static final MethodDescriptor<ByteBuf, ByteBuf> NEW_TUNNEL_METHOD = MethodDescriptor.newBuilder(
ByteBufMarshaller.INSTANCE,
ByteBufMarshaller.INSTANCE
)
.setFullMethodName(TUNNEL_SERVICE + "/new")
.setType(MethodDescriptor.MethodType.BIDI_STREAMING)
.build();
See bsideup/grpc-bidi@bd35134
Prettier-Java 0.6.0
# Options (if any): --print-width 120It looks like #632 , despite being a great improvement overall, introduced a regression when the first method call needs to be multi-line due to long arguments, leading to a closing
)misaligned.Input:
Output:
Expected behavior:
Alternative expected behavior:
See bsideup/grpc-bidi@bd35134