Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

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

オープン
#1,249 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
tooling

調査の方向性

まず、提供された Javadoc の例を java-format で再現し、@InternalApi の周辺で入力とフォーマット済みの出力を比較します。Javadoc のフォーマット処理の経路を追跡して、その改行が削除される理由を特定し、その後、改行が保持されることを示す回帰テストを追加または更新します。

索引モデルが issue の本文から書いたものです。

説明

We have a string as:

// AUTO-GENERATED DOCUMENTATION AND METHOD.
/**
* <p> Sample code:
* <pre>{@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();
* }
* }</pre>
* @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:

// AUTO-GENERATED DOCUMENTATION AND METHOD.
  /**
   * Sample code:
   *
   * <pre>{@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();
   * }
   * }</pre>
   *
   * @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!

主要言語
Java
スター
6.2k
フォーク
936
平均マージ
6分
マージ済み PR(30日)
3

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

google/google-java-format のほかの issue

google/google-java-format の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。