google / google/google-java-format

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

オープン
#1,249 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
6.2k
フォーク
937
平均マージ
6分
マージ済み PR(30日)
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 を短くまとめたダイジェスト。