Skip to content

feat(style checks): allow underscore lambda params #254

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from

Conversation

ace-n
Copy link

@ace-n ace-n commented May 26, 2021

We should allow __ to denote that a (required) lambda parameter is unused.

(I didn't do this for standard method parameters, as that seems overkill for our purposes. After all, no-argument methods are allowed in Java - but no-argument lambdas are not.)

As discussed in this StackOverflow post.

@ace-n ace-n requested a review from lesv May 26, 2021 01:51
@lesv
Copy link
Contributor

lesv commented May 26, 2021

It's not in the official style guide.
@averikitsch @kurtisvg thoughts?

@ace-n
Copy link
Author

ace-n commented May 26, 2021

Per offline conversation with @lesv and internal research - the right answer here is to use single-letter variable names. (The underscore approach suggested here has been considered in the past, and was previously decided against.)

@ace-n ace-n closed this May 26, 2021
@ace-n ace-n deleted the ace-n-patch-1-1 branch May 26, 2021 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants