Remove parentheses for single parameter lambda
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
Research direction
Review the lambda-formatting path and the OpsBuilder behavior mentioned in the issue. Determine whether single-parameter lambdas should be emitted without parentheses while preserving the formatter's design constraints. Done means reaching a clear decision and, if accepted, defining the expected formatting behavior and its tests.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- Java
- Stars
- 6.2k
- Forks
- 936
- Avg merge
- 6m
- Merged PRs (30d)
- 3
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from google/google-java-format
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
google/google-java-format#1094 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
google/google-java-format#1450 · 1 reaction ·
Maintainers usually reply within 1 day
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
google/google-java-format#1439 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 62/100
google/google-java-format#1436 · 2 comments ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 48/100
google/google-java-format#1428 · 4 comments ·
Maintainers usually reply within 1 day
All issues in google/google-java-format
Similar issues
-
and-bugs and-ui gpx-track
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
Maintainers usually reply within 2 days
-
TerminalRow.mSpaceUsed (short) overflows on terminals wider than 1023 columns, crashing setCharOpen
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
termux/termux-app#5340 ·
Maintainers usually reply within 1 day
-
OpenAICompatibleToolDescriptorSchemaGenerator drops requiredProperties of nested object parametersOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 7 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
apache/rocketmq-dashboard#5110 ·
Maintainers usually reply within 1 day
-
frontend
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
No-Country-simulation/S08-26-equipo04#210 ·
Maintainers usually reply within 1 day