如何配置Spotless Google格式化程序以格式化大括号

huangapple go评论69阅读模式
英文:

How to configure spotless google formatter to format braces

问题

如何配置Spotless Google格式化程序,以将大括号格式化为2行而不是单行

- void contextLoads() {}
+ void contextLoads() {
+ }
英文:

How to configure spotless google formatter to format braces in 2 lines instead of a single line

-    void contextLoads() {}
+    void contextLoads() {
+    }

答案1

得分: 1

你无法。来自google-java-formatREADME

注意:对于格式化的算法,没有可配置性。这是一个有意的设计决策,以便在单一格式上统一我们的代码格式。

英文:

You can't. From google-java-format's README:

> Note: There is no configurability as to the formatter's algorithm for formatting. This is a deliberate design decision to unify our code formatting on a single format.

huangapple
  • 本文由 发表于 2020年10月10日 14:08:55
  • 转载请务必保留本文链接:https://go.coder-hub.com/64290530.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定