Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

A space is inserted after slash-star /* comments

未關閉
#569 1 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

還沒有人認領這個 Issue。

評估

難度
2/5
預估耗時
1-3 小時
新手友好度
48/100
Issue 類型
缺陷
描述清晰度
基本清楚
活躍度
停滯
技術堆疊
java
領域
tooling

研究方向

重現短行格式化範例,然後檢查 core/src/main/java/com/google/googlejavaformat/OpsBuilder.java 第 510 行附近的程式碼。判斷 /* comment 後的空格是否是刻意的;如果不是,請確認 formatter 的行為,以及修正後輸出所需的回歸測試涵蓋範圍。

由索引模型根據 Issue 內容生成。

描述

GJF emits the following:

f(43
    /*bla */ )

(when the max line width is short enough)

Note the space between the closing */ and the closing ).

This is coming from https://github.com/google/google-java-format/blob/506875dc3f0f1018676c764e5fe58c9a8c216900/core/src/main/java/com/google/googlejavaformat/OpsBuilder.java#L510

Is this intended?

主要語言
Java
星號
6.2k
分支
936
平均合併
6 分鐘
30 天內合併 PR
3

貢獻指南

開啟貢獻指南

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

google/google-java-format 的其他 Issue

查看 google/google-java-format 的全部 Issue

相似的 Issue

更多 Java Issue

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。