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

Disambiguating multiple formatted files when writing to standard output

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
38/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
cli

調査の方向性

issue に示されている google-java-format CLI の呼び出しから始め、複数ファイルのフォーマット結果を標準出力に送る場合に焦点を当てます。各フォーマット結果をソースパスと明確に対応付ける方法を決め、その後、4 ファイルの例と同等のバッチ入力で動作を確認します。

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

説明

When using google-java-format to format multiple files and print their formatted results to standard-out, it's unclear how I'm supposed to disambiguate between the results in the output. For performance reasons, I am running google-java-format against my codebase in batches of 100 files at a time, and for various other reasons, formatting in-place is not preferred.

For example, running this:

java -jar $HOME/bin/google-java-format --aosp path/to/file1.java path/to/file2.java path/to/file3.java path/to/file4.java

results in output like this:

/* my file 1 */

public class File1 {
    // ...
}
/* my file 2 */

public class File2 {
    // ...
}
/* my file 3 */

public class File3 {
    // ...
}
/* my file 4 */

public class File4 {
    // ...
}

This example is kind of contrived, but the main point is that the end of file1.java and the start of file2.java, and so on, are not delimited in a clear way. What can I do here to clearly associate the output for each formatted file with its source path?

主要言語
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 を短くまとめたダイジェスト。