Support using tabs for indentation (--use-tabs flag)
维护者通常 1 天内回复
还没有人认领这个 Issue。
评估
调研方向
Review the API support added in #1320 and the existing --max-line-length CLI option as starting points. Determine how a --use-tabs flag should connect to the formatter’s tab configuration, then verify that CLI formatting uses tab-based indentation while preserving the project’s opinionated formatting behavior.
由索引模型根据 Issue 内容生成。
描述
Support for configuring tabs was added to the API in #1320, but there is not currently a CLI flag for it.
In general google-java-format remains committed to being an opinionated, low-configuration formatter (https://github.com/google/google-java-format/issues/425#issuecomment-5928605364). Line lengths and tabs are in a different category than configuration for core formatting layout decisions. Other opinionated formatters also support configuring line lengths and tabs.
The bug for line lengths (#425) reviewed more votes, there have been fewer requests for tabs. There's some evidence tabs are not as widely used as spaces in the Java ecosystem.
Another potential different from --max-line-length is that it's possible to convert spaces to tabs by post-processing the formatter output, i.e.
google-java-format - | unexpand -t 2
Adding a --use-tabs flag is currently unplanned, this bug tracks demand for it. If you would like to use google-java-format but its lack of support for tab-based indents is prevent you from doing that, please 'thumbs up' the bug or leave a comment.
- 主要语言
- Java
- 星标
- 6.2k
- 派生
- 940
- 平均合并
- 5 分钟
- 30 天内合并 PR
- 8
环境准备
- 没有 Dockerfile 或 Docker Compose 文件
- 没有 Pull Request 模板
- 阅读贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
google/google-java-format 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
google/google-java-format#1094 · 1 条评论 ·
维护者通常 1 天内回复
-
IndexOutOfBoundsException - Wrong formatted content when dealing with latex String可能重新可做 @Amlan2000 于 57 天前认领,目前没有进行中的 PR。 未关闭
难度 4/5 3-5 天 新手友好度 55/100
google/google-java-format#1439 · 1 条评论 ·
维护者通常 1 天内回复
-
unused import removal leaves extra blank line between package declaration and class Javadoc / declaration可能已有人在做 @arimu1 于 67 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 62/100
google/google-java-format#1436 · 2 条评论 ·
维护者通常 1 天内回复
-
Eclipse
难度 3/5 1-2 天 新手友好度 48/100
google/google-java-format#1428 · 4 条评论 ·
维护者通常 1 天内回复
-
Eclipse
难度 3/5 1-2 天 新手友好度 55/100
google/google-java-format#1417 ·
维护者通常 1 天内回复
查看 google/google-java-format 的全部 Issue
相似的 Issue
-
Use GHA setup gradle action可能已有人在做 @bric3 今天认领。 未关闭
难度 2/5 1-3 小时 新手友好度 67/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
openhab/openhab-addons#21921 ·
维护者通常 1 天内回复
-
bug
难度 2/5 1-3 小时 新手友好度 62/100
jellyfin/jellyfin-androidtv#5885 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 76/100
维护者通常 1 天内回复
-
priority:P2 product:orazaka type:bug
难度 2/5 1-3 小时 新手友好度 78/100
维护者通常 1 天内回复