google / google/google-java-format
Should the formatter also add missing braces
未關閉
non-whitespace
- 主要語言
- Java
- 星號
- 6.2k
- 分支
- 937
- 平均合併
- 6 分鐘
- 30 天內合併 PR
- 3
描述
To correct any violation of https://google.github.io/styleguide/javaguide.html#s4.1.1-braces-always-used
Currently it looks like a code that is formatted like
``` java
if (condition)
do_something
```
would be formatted (after running the tool) as:
``` java
if (condition) do_someting
```
where as I would expect it to be formatted as:
``` java
if (condition) {
do_something
}
```
貢獻指南
研究方向
該 issue 只提供了一個 Java 輸入/輸出範例,沒有指定原始檔、測試或進入點。先使用 google-java-format 重現該範例,然後定位處理單一陳述式控制主體的 formatter 路徑;當輸出使用大括號並如所示保留主體時,即表示完成。
由索引模型根據 Issue 內容生成。
評估
- 技術堆疊
- java
- 領域
- tooling
- Issue 類型
- 功能
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 活躍度
- 停滯
- 描述清晰度
- 描述清楚
- 新手友好度
- 35/100