google / google/google-java-format

Remove parentheses for single parameter lambda

オープン
#762 コメント 2 件 リアクション 2 件 担当者 0 名 GitHub で見る
non-whitespace
主要言語
Java
スター
6.2k
フォーク
937
平均マージ
6分
マージ済み PR(30日)
3

説明

I understand this is probably against the design philosophy, but I would like to get it confirmed if that is the case.

It is generally considered to be a bette practice omitting parentheses for single parameter lambda, for example `foo -> ...` is better than `(foo) -> ...`, from readability perspective.

I tried hacking around and could get it to work, but I had to ignore a token by adding a new method to `OpsBuilder`, so either I'm doing something wrong or this is very much against the design philosophy (respecting original input as much as possible, IIUC).

Could you please help me understand whether this is a valid feature request or not? Thank you very much.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

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

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