google / google/google-java-format

Avoid excessive newlines for short variable names with --aosp

未關閉
#970 0 則留言 2 個 reaction 已指派 0 人 在 GitHub 檢視
主要語言
Java
星號
6.2k
分支
937
平均合併
6 分鐘
30 天內合併 PR
3

描述

I'm trying this out in chromium codebase, and besides the known-issue of excessive lambda whitespace (issue #19), I'm finding the most jarring thing is odd whitespace for variable assignments.

google-java-format does:

```
desc =
getResources()
.getString(R.string.cablev2_error_ble_permission, packageLabel);
```

instead of:
```
desc = getResources()
.getString(R.string.cablev2_error_ble_permission, packageLabel);
```

I'm guessing it might be because with two space indents, the wrapped line appears under the = sign (which looks less weird), but with four space indent, it looks really odd

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

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

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