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

Add Kotlin support for Junit 5 recipes 1: CleanupJUnitImports #528

Conversation

amitojduggal
Copy link
Contributor

@amitojduggal amitojduggal commented Jun 17, 2024

What's changed?

Some of the recipes were not working with Kotlin code bases, i would like to add this one as a first example and will change the rest of the recipes the same way after the feedback. More MRs to follow.

The change is around the usage of visitCompilationUnit, this visitor doesn't work with Kotlin codebases , i made the change to use preVisit, and this seems to fix it.

What's your motivation?

we would like to make the recipes work on Kotlin codebases

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

Please let me know if this is the correct way, especially to add tests for both Kotlin and Java together like the way I have done.

Anyone you would like to review specifically?

@timtebeek @knutwannheden

Have you considered any alternatives or workarounds?

Nope

Any additional context

Checklist

  • I've added unit tests to cover both positive and negative cases
  • I've read and applied the recipe conventions and best practices
  • I've used the IntelliJ IDEA auto-formatter on affected files

@timtebeek timtebeek self-requested a review June 17, 2024 09:08
@timtebeek timtebeek added the bug Something isn't working label Jun 17, 2024
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.

Great work here @amitojduggal ! I've pushed two small changes to separate commits just to polish this up, but otherwise good to merge. Thanks a lot for getting this started!

@timtebeek timtebeek merged commit cde1c39 into openrewrite:main Jun 17, 2024
2 checks passed
@amitojduggal
Copy link
Contributor Author

Thanks a lot for the quick feedback @timtebeek :), I will continue working on similar changes.

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.

2 participants