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

Refactor assertEquals(<boolean-literal>, …) and assertNotEquals(<boolean-literal>, …) to assertTrue or assertFalse #417

Merged

Conversation

ammachado
Copy link
Contributor

What's changed?

Improves the current cleanup rules by refactoring assertEquals(false, a.methodCall(...)) to assertFalse(a.methodCall(...))

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've added the license header to any new files through ./gradlew licenseFormat
  • I've used the IntelliJ IDEA auto-formatter on affected files

@ammachado ammachado force-pushed the assert-equals-boolean-to-assert-boolean branch from 4ace42e to eec6d6a Compare October 24, 2023 20:06
Copy link
Contributor

@timtebeek timtebeek left a comment

Choose a reason for hiding this comment

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

Pretty much a perfect pull request, thanks a lot! I've posted some minor suggestions/questions; trust that you'll resolve them as you see fit, and we can merge right after that.

@ammachado ammachado force-pushed the assert-equals-boolean-to-assert-boolean branch from eec6d6a to 389d333 Compare October 24, 2023 21:58
@timtebeek timtebeek added the recipe Recipe request label Oct 27, 2023
@timtebeek timtebeek merged commit 1ee57c8 into openrewrite:main Oct 27, 2023
@timtebeek
Copy link
Contributor

timtebeek commented Oct 27, 2023

Thanks a lot @ammachado ! You can try out this change through our snapshot versions. We'll follow up with a release soon. I'll also push this up to the Moderne platform such that you can try it out at scale there.

@timtebeek
Copy link
Contributor

Ran this again netflix conductor, with some results there: https://app.moderne.io/results/QtIfI8Wpq/details/eyJfX3R5cGVuYW1lIjoiR2l0SHViUmVwb3NpdG9yeSIsIm9yaWdpbiI6ImdpdGh1Yi5jb20iLCJwYXRoIjoiTmV0ZmxpeC9jb25kdWN0b3IiLCJicmFuY2giOiJtYWluIn0=?referrer=https%3A%2F%2Fapp.moderne.io%2Fresults%2FQtIfI8Wpq
image

Confirmed to work; thanks again! And feel free to open that PR to conductor if you're up for it. :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
recipe Recipe request
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants