Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Regression in 2.6.0

Đang mở
#683 4 bình luận 1 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 2 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
3/5
Thời gian dự kiến
1-2 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
java
Lĩnh vực
tooling

Hướng nghiên cứu

Tái hiện hồi quy định dạng bằng đầu vào Java được cung cấp và --print-width 120, sau đó kiểm tra thay đổi từ pull request 632 và commit grpc-bidi được tham chiếu. Hoàn thành khi formatter nhất quán tạo ra một trong hai bố cục dấu ngoặc đóng dự kiến và hồi quy được bao phủ bởi một kiểm tra có thể tái hiện.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Prettier-Java 0.6.0

# Options (if any):
--print-width 120

It looks like https://github.com/jhipster/prettier-java/pull/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 https://github.com/bsideup/grpc-bidi/commit/bd351342e59ed4be2ad6f18e32f174978f0c7c02

Ngôn ngữ chính
Java
Star
1.2k
Fork
123
Merge trung bình
2 ngày 10 giờ
Pull request đã merge (30 ngày)
35

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của jhipster/prettier-java

Tất cả issue của jhipster/prettier-java

Issue tương tự

Thêm issue về Java

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.