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

Limit RemoveIsMatcher to invocations within assertThat #374

Merged
merged 7 commits into from
Jul 10, 2023

Conversation

AlekSimpson
Copy link
Contributor

What's changed?

This PR fixes an issue where the recipe that removed is() invocations would remove them even when they were not found directly inside of an assertThat invocation.

What's your motivation?

#365

Anything in particular you'd like reviewers to focus on?

I added two tests based off of the last comment on the ticket. Both tests now pass in this PR, so I think the bug should be fixed. I think how I implemented the fix shouldn't interfere with any other parts of the recipe.

Anyone you would like to review specifically?

@timtebeek

Any additional context

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 auto-formatter on affected files
  • I've updated the documentation (if applicable)

@AlekSimpson AlekSimpson added the bug Something isn't working label Jul 7, 2023
@AlekSimpson AlekSimpson self-assigned this Jul 7, 2023
@AlekSimpson AlekSimpson marked this pull request as draft July 7, 2023 15:12
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.

Quite some suggestions; think when we apply these we ought to be done with this change. Thanks for getting this started!

@timtebeek timtebeek changed the title Alek/fix issue365 Limit RemoveIsMatcher to invocations within assertThat Jul 8, 2023
@AlekSimpson AlekSimpson marked this pull request as ready for review July 10, 2023 13:57
@timtebeek timtebeek merged commit 18a943d into main Jul 10, 2023
@timtebeek timtebeek deleted the alek/FixIssue365 branch July 10, 2023 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

Remove Hamcrest is(Matcher) should only apply to calls (directly) within assertThat(.., Matcher)
2 participants