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

String splitting / wrapping can increase line length

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

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

評価

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

調査の方向性

google-java-format 1.18.1 を使用して、issue に示されている Java の入力と出力で報告を再現します。フォーマッタの文字列リテラル分割ロジックと行長テストを追跡します。完了の条件は、長いリテラルが折り返しによってさらに長くならず、既存のフォーマット動作が引き続きテストでカバーされることです。

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

説明

Version

1.18.1, all-deps JAR

Description

In some cases Google Java Format wraps / splits long string literals which exceed the maximum line length in a way which makes the string literal exceed the maximum line length even further.

In those cases maybe it would be better if the string had not been split / wrapped.

Example
class Test {
  void test() {
    System.out.println(
        "\nSee https://example.com/some-really-long-path-which-exceeds-the-maximum-line-length-of-the-formatter");
  }
}

The formatted result is:

class Test {
  void test() {
    System.out.println(
        "\n"
            + "See https://example.com/some-really-long-path-which-exceeds-the-maximum-line-length-of-the-formatter");
  }
}
主要言語
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 を短くまとめたダイジェスト。