Skip to content
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

Turn off UnnecessaryLambda check in tests #1210

Merged
merged 5 commits into from
Feb 4, 2020

Conversation

dansanduleac
Copy link
Contributor

Before this PR

UnnecessaryLambda errorprone check blocking baseline in projects with -Werror.

After this PR

==COMMIT_MSG==
Turn off UnnecessaryLambda in tests where it doesn't provide value because there is a ubiquitous use case that is painful to fix.
==COMMIT_MSG==

Possible downsides?

@changelog-app
Copy link

changelog-app bot commented Feb 4, 2020

Generate changelog in changelog/@unreleased

Type

  • Feature
  • Improvement
  • Fix
  • Break
  • Deprecation
  • Manual task
  • Migration

Description

Turn off UnnecessaryLambda in tests where it doesn't provide value because there is a ubiquitous use case that is painful to fix.

Check the box to generate changelog(s)

  • Generate changelog entry

@policy-bot policy-bot bot requested a review from iamdanfox February 4, 2020 12:08
@@ -57,7 +57,8 @@
"ArrayEquals",
"MissingOverride",
"UnnecessaryParentheses",
"PreferJavaTimeOverload");
"PreferJavaTimeOverload",
"UnnecessaryLambda");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I recall this creating code that didn’t compile, might want to test it on something large and internal (or atlas) first

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dansanduleac you can use the hot new ./gradlew compileJava compileTestJava -PerrorProneApply=UnnecessaryLambda

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've tested it on a project where this was causing trouble and it produced no fixes... if you recall this way, then maybe i can just remove it from here and let people deal with it

@bulldozer-bot bulldozer-bot bot merged commit 5e34e4a into develop Feb 4, 2020
@bulldozer-bot bulldozer-bot bot deleted the ds/unnecessary-lambda-not-in-tests branch February 4, 2020 14:21
@svc-autorelease
Copy link
Collaborator

Released 3.2.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants