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

Make rewrite-maven-plugin search for Kotlin source files in src/*/java if src/*/kotlin does not exist #937

Merged
merged 12 commits into from
Jan 28, 2025

Conversation

reisners
Copy link
Contributor

What's changed?

Added an integration test case that verifies that a Kotlin source file under src/main/java was detected and modified by a recipe (Autoformat). This test case initially fails because the rewrite-maven-plugin does not detect Kotlin source files under src/main/java.

What's your motivation?

To demonstrate the issue described in #936

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

I will push the fix in a separate commit.

Anyone you would like to review specifically?

Have you considered any alternatives or workarounds?

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

which fails initially because 0 kotlin source files will be found in the non-existent src/main/kotlin
@timtebeek timtebeek marked this pull request as draft January 23, 2025 17:13
@timtebeek
Copy link
Contributor

Thanks for the work so far @reisners ! Look forward to the fix. 🙏🏻

github-actions[bot]

This comment was marked as off-topic.

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.

Looking good so far already, although I only have my mobile here to review. @MBoegers would you mind having a look somewhere in the coming week?

@MBoegers
Copy link
Contributor

Sure first thing tomorrow and hi @reisners

Copy link
Contributor

@MBoegers MBoegers left a comment

Choose a reason for hiding this comment

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

I left a few suggestions and questions that popped up in my mind while following your changes.
Your changes are fully functional, but I think we should add a little bit more coverage.

Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • src/test/resources-its/org/openrewrite/maven/RewriteDryRunIT/multi_module_project/b/src/main/java/sample/EmptyBlockSample.java
    • lines 3-3

@MBoegers
Copy link
Contributor

@reisners Do you have any addition in mind or can we propagate the PR from draft?

@reisners
Copy link
Contributor Author

I had to answer to one comment from @timtebeek, waiting for feedback. When that is resolved, we good to proceed.

@MBoegers MBoegers marked this pull request as ready for review January 28, 2025 13:27
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Some suggestions could not be made:

  • src/test/resources-its/org/openrewrite/maven/RewriteDryRunIT/multi_module_project/b/src/main/java/sample/EmptyBlockSample.java
    • lines 3-3

@MBoegers MBoegers merged commit e572785 into openrewrite:main Jan 28, 2025
2 checks passed
@timtebeek
Copy link
Contributor

Thanks both! Great to have these additional source locations covered

@reisners
Copy link
Contributor Author

reisners commented Jan 28, 2025 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request parser-maven
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

3 participants