google / google/google-java-format

Support Markdown Documentation Comments (JEP 467, JDK 23)

Đang mở
#1,193 9 bình luận 22 reaction 1 người được giao Được @eamonnmcmanus nhận Xem trên GitHub
Java 25
Ngôn ngữ chính
Java
Star
6.2k
Fork
937
Merge trung bình
6 phút
Pull request đã merge (30 ngày)
3

Mô tả

Consider the following code:

```java
import java.nio.ByteBuffer;

interface BufferAllocator {
/// Returns a lease for a [ByteBuffer] with at least the specified [capacity][ByteBuffer#capacity].
LeasedByteBuffer getByteBuffer(long minCapacity);
}
```

Formatting the above code causes the following issues:
1. The doc comment is split into two lines, but the second line starts with `//` instead of `///`.
2. The import statement is removed, breaking the links.

Disabling Javadoc formatting doesn't prevent either issue.
The only workaround I could find was to disable google-java-format.

Tested with JDK 23 and google-java-format 1.24.0.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

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.