Skip to content

Conversation

steve-aom-elliott
Copy link
Contributor

This mostly crops up during our tests in reality.

What's changed?

During the visitor, if you detect that a file does not have a JavaProject marker, we normally would return back unchanged early. With this change, if you are also instructing ModuleHasDependency to invert the marking (i.e. mark files that are part of a module that does not contain the dependency instead), now it will also mark files that do not have the marker at all.

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

…is also true, as they vacuously would not have a particular dependency in real-world scenarios. This mostly crops up during our tests in reality.
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…ow it's complaining about lack of a new line.
@steve-aom-elliott steve-aom-elliott moved this from In Progress to Ready to Review in OpenRewrite Aug 1, 2025
@sambsnyd sambsnyd merged commit 373c0bc into main Aug 1, 2025
2 checks passed
@sambsnyd sambsnyd deleted the module-has-dependency-invert-mark-vacuous branch August 1, 2025 20:55
@github-project-automation github-project-automation bot moved this from Ready to Review to Done in OpenRewrite Aug 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request recipe
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

2 participants