We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
AssertTrue(false)
fail
I have in my code some (Junit5) AssertTrue(false, "this shouldn't happen"), because someone didn't use fail when they should have.
AssertTrue(false, "this shouldn't happen")
The Junit5 cleanup recipe should convert such cases to fail("this shouldn't happen"). The AssertJ best pratices recipe might add a similar recipe.
fail("this shouldn't happen")
no
The text was updated successfully, but these errors were encountered:
Hi @timo-abele ; Yes would fit right in with some of the other AssertTrue migration recipes we already have in https://github.com/openrewrite/rewrite-testing-frameworks/tree/a426e409ca3b8e04c6470e86cc09d61346e7c0f4/src/main/java/org/openrewrite/java/testing/cleanup
We could even implement this as a Refaster recipe, similar to what we recently added to rewrite-static-analysis in
Given that there's good examples to work from already I'm going to mark this one as good first issue; anyone welcome to pick this up!
Sorry, something went wrong.
No branches or pull requests
What problem are you trying to solve?
I have in my code some (Junit5)
AssertTrue(false, "this shouldn't happen")
, because someone didn't usefail
when they should have.Describe the solution you'd like
The Junit5 cleanup recipe should convert such cases to
fail("this shouldn't happen")
.The AssertJ best pratices recipe might add a similar recipe.
Have you considered any alternatives or workarounds?
Additional context
Are you interested in contributing this feature to OpenRewrite?
no
The text was updated successfully, but these errors were encountered: