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 unlessUsing property to RemoveDependency recipe #129

Merged

Conversation

jevanlingen
Copy link
Contributor

@jevanlingen jevanlingen commented Nov 13, 2024

What's changed?

Add an unlessUsing property to the RemoveDependency recipe.

What's your motivation?

Sometimes you want to remove a dependency, unless it is used by the code.

Have you considered any alternatives or workarounds?

A workaround is just to run current recipe and after migration see if the code still compiles.

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

@jevanlingen jevanlingen added enhancement New feature or request recipe labels Nov 13, 2024
@jevanlingen jevanlingen self-assigned this Nov 13, 2024
@jevanlingen jevanlingen linked an issue Nov 13, 2024 that may be closed by this pull request
@jevanlingen jevanlingen changed the title Start implementing unlessUsing property AddunlessUsing property to RemoveDependency Nov 13, 2024
@jevanlingen jevanlingen changed the title AddunlessUsing property to RemoveDependency Add unlessUsing property to RemoveDependency Nov 13, 2024
@jevanlingen jevanlingen changed the title Add unlessUsing property to RemoveDependency Add unlessUsing property to RemoveDependency recipe Nov 13, 2024
timtebeek and others added 2 commits November 13, 2024 12:16
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
@jevanlingen jevanlingen marked this pull request as ready for review November 13, 2024 11:28
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 to see this added so quickly; thanks @jevanlingen !

@timtebeek timtebeek merged commit a742518 into main Nov 13, 2024
2 checks passed
@timtebeek timtebeek deleted the 11-add-a-unlessusing-option-to-the-removedependency-recipe branch November 13, 2024 12:25
sambsnyd pushed a commit that referenced this pull request Dec 11, 2024
* Start implementing `unlessUsing` property

* Change test to use a Java source file too; add TODOs

* Apply suggestions from code review

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>

* Implement `unlessUsing` property

* Nullable options should not be required in Yaml

* Adopt UsesType instead of looking for method patterns, to match AddDependency

* Reduce warnings

---------

Co-authored-by: Tim te Beek <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
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.

Add a unlessUsing option to the RemoveDependency recipe
2 participants