Regression in 2.6.0
維護者通常 2 天內回覆
還沒有人認領這個 Issue。
評估
研究方向
使用提供的 Java 輸入和 --print-width 120 重現格式回歸,然後檢查 pull request 632 中的變更以及所參照的 grpc-bidi commit。完成的標準是 formatter 始終產生兩種預期的右括號配置之一,並且透過可重現的檢查涵蓋此回歸。
由索引模型根據 Issue 內容生成。
描述
Prettier-Java 0.6.0
# Options (if any):
--print-width 120
It looks like https://github.com/jhipster/prettier-java/pull/632 , despite being a great improvement overall, introduced a regression when the first method call needs to be multi-line due to long arguments, leading to a closing ) misaligned.
Input:
public static final MethodDescriptor<ByteBuf, ByteBuf> NEW_TUNNEL_METHOD = MethodDescriptor
.newBuilder(ByteBufMarshaller.INSTANCE, ByteBufMarshaller.INSTANCE)
.setFullMethodName(TUNNEL_SERVICE + "/new")
.setType(MethodDescriptor.MethodType.BIDI_STREAMING)
.build();
Output:
public static final MethodDescriptor<ByteBuf, ByteBuf> NEW_TUNNEL_METHOD = MethodDescriptor.newBuilder(
ByteBufMarshaller.INSTANCE,
ByteBufMarshaller.INSTANCE
)
.setFullMethodName(TUNNEL_SERVICE + "/new")
.setType(MethodDescriptor.MethodType.BIDI_STREAMING)
.build();
Expected behavior:
public static final MethodDescriptor<ByteBuf, ByteBuf> NEW_TUNNEL_METHOD = MethodDescriptor
.newBuilder(ByteBufMarshaller.INSTANCE, ByteBufMarshaller.INSTANCE)
.setFullMethodName(TUNNEL_SERVICE + "/new")
.setType(MethodDescriptor.MethodType.BIDI_STREAMING)
.build();
Alternative expected behavior:
public static final MethodDescriptor<ByteBuf, ByteBuf> NEW_TUNNEL_METHOD = MethodDescriptor.newBuilder(
ByteBufMarshaller.INSTANCE,
ByteBufMarshaller.INSTANCE
)
.setFullMethodName(TUNNEL_SERVICE + "/new")
.setType(MethodDescriptor.MethodType.BIDI_STREAMING)
.build();
See https://github.com/bsideup/grpc-bidi/commit/bd351342e59ed4be2ad6f18e32f174978f0c7c02
- 主要語言
- Java
- 星號
- 1.2k
- 分支
- 123
- 平均合併
- 2 天 10 小時
- 30 天內合併 PR
- 35
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
jhipster/prettier-java 的其他 Issue
-
String[]::new treated as a complex argument, breaking member chains可能已有人在做 @jtkiesel 今天認領。 未關閉
難度 2/5 1-3 小時 新手友好度 72/100
jhipster/prettier-java#1113 ·
維護者通常 2 天內回覆
-
難度 3/5 1-2 天 新手友好度 56/100
jhipster/prettier-java#1114 ·
維護者通常 2 天內回覆
-
Text block containing a comment-like line with " or \ fails with "Comment was not printed"可能已有人在做 @sean0407 於 5 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 66/100
jhipster/prettier-java#1112 ·
維護者通常 2 天內回覆
-
難度 4/5 3-5 天 新手友好度 48/100
jhipster/prettier-java#1031 ·
維護者通常 2 天內回覆
-
Adds needlessly parentheses可能已有人在做 @braxtonzhangio 於 77 天前認領。 未關閉
難度 3/5 1-2 天 新手友好度 67/100
jhipster/prettier-java#1001 ·
維護者通常 2 天內回覆
查看 jhipster/prettier-java 的全部 Issue
相似的 Issue
-
難度 1/5 1 小時以內 新手友好度 85/100
-
[Bug]: REST API URL starting with "http" but no scheme (e.g. httpbin.org/get) is not given an http:// prefix可能已有人在做 @ItsDeadlyProgrammer 於 1 天前認領。 未關閉
難度 2/5 1-3 小時 新手友好度 68/100
appsmithorg/appsmith#42471 · 1 則留言 ·
維護者通常 2 天內回覆
-
code-maintenance
難度 2/5 1-3 小時 新手友好度 77/100
維護者通常 1 天內回覆
-
難度 1/5 1 小時以內 新手友好度 85/100
-
bug priority: medium Review effort [1-5]: 3 status: needs-triage type: bug
難度 2/5 1-3 小時 新手友好度 82/100
carlos-emr/carlos#5258 ·
維護者通常 1 天內回覆