google / google/google-java-format

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

未关闭
#1,249 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
Java
星标
6.2k
派生
937
平均合并
6 分钟
30 天内合并 PR
3

描述

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!

贡献指南

打开贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。