Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Regression in 2.6.0

オープン
#683 コメント 4 件 リアクション 1 件 担当者 0 名 GitHub で見る

メンテナーはふだん 2 日以内に返信

まだ誰も着手していません。

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
45/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
java
領域
tooling

調査の方向性

提供された Java 入力と --print-width 120 を使用してフォーマットのリグレッションを再現し、その後、pull request 632 の変更と参照されている grpc-bidi のコミットを調査します。formatter が期待される 2 つの閉じ括弧のレイアウトのいずれかを一貫して生成し、再現可能なチェックでリグレッションがカバーされれば完了です。

索引モデルが 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時間
マージ済み PR(30日)
35

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jhipster/prettier-java のほかの issue

jhipster/prettier-java の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。