-
Notifications
You must be signed in to change notification settings - Fork 135
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
fix #894: Error Prone UnnecessaryLambdaArgumentParentheses #1186
fix #894: Error Prone UnnecessaryLambdaArgumentParentheses #1186
Conversation
Lambdas with a single parameter do not require argument parentheses. ```diff - (value) -> value != null + value -> value != null ```
Generate changelog in
|
pending testing on a large internal project |
We should also remove the existing checkstyle rule |
…com:palantir/gradle-baseline into ckozak/UnnecessaryLambdaArgumentParentheses
Good call, updated and increased the level to WARN. |
link = "https://github.com/palantir/gradle-baseline#baseline-error-prone-checks", | ||
linkType = BugPattern.LinkType.CUSTOM, | ||
providesFix = BugPattern.ProvidesFix.REQUIRES_HUMAN_ATTENTION, | ||
severity = BugPattern.SeverityLevel.WARNING, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should go with error since checkstyle previous enforced this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most projects fail on WARNING -- iirc we tried using ERROR for the BracesRequired
check but ran into issues (possibly with generated code).
Since excavator will auto-fix anything in projects that don't fail on warnings, I don't think there's much risk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok sure!
👍 |
Released 3.1.0 |
Lambdas with a single parameter do not require argument parentheses.
After this PR
==COMMIT_MSG==
Lambdas with a single parameter do not require argument parentheses.
==COMMIT_MSG==
Possible downsides?
This is already validated by checkstyle, however checkstyle doesn't provide functionality to automatically fix occurrences.