google / google/google-java-format

No new line break for some at-sign@ in Javadoc comment

Đang mở
#1,249 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
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ả

We have a string as:

```java
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
*

Sample code:
*

{@code

* // This snippet has been automatically generated and should be regarded as a code template only.
* try (EchoServiceClient echoServiceClient =
* EchoServiceClient.create()) {
* EchoResponse response =
* echoServiceClient.chat();
* }
* }

* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails
* @InternalApi This method is internal used only. Please do not use directly.
*/
```

After running java-format on the above string, the Javadoc comment gets reformatted as:

```java
// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* Sample code:
*
*

{@code

* // This snippet has been automatically generated and should be regarded as a code template only.
* try (EchoServiceClient echoServiceClient =
* EchoServiceClient.create()) {
* EchoResponse response =
* echoServiceClient.chat();
* }
* }

*
* @param request The request object containing all of the parameters for the API call.
* @throws com.google.api.gax.rpc.ApiException if the remote call fails @InternalApi This method
* is internal used only. Please do not use directly.
*/
```

Notice the line break before `@InternalApi ` was removed and a line break was added after `@InternalApi This method`. This makes the method comments hard to read.
Could you please help investigate?
Thank you!

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.