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

Comment "// @formatter:off" was not printed

Đã đóng
#1,098 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

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

Một pull request liên quan đã được merge.

  • #1109 của @jtkiesel — đã merge

Đánh giá

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

Hướng nghiên cứu

Start by reproducing the crash with the Java input in the issue, which places // @formatter:off comments inside a method body and a method call argument list. The error comes from the plugin's comment handling, so trace how @formatter:off and @formatter:on comments are attached and printed. Done means the sample formats without the error and the output keeps the disabled region unchanged, with a regression test added.

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

Mô tả

prettier-plugin-java 2.11.0

Input:

// @formatter:off
void main() {
    // @formatter:on
    List.of(
    // @formatter:off
            String.valueOf("abc")
        );
}

Output:

 Error: Comment "// @formatter:off" was not printed. Please report this error!

Expected behavior:

Ngôn ngữ chính
Java
Star
1.2k
Fork
122
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.