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

Drop OperatorWrap as there's a copy maintained in rewrite-static-analysis #4509

Merged
merged 2 commits into from
Sep 21, 2024

Conversation

timtebeek
Copy link
Contributor

@timtebeek timtebeek commented Sep 21, 2024

What's changed?

Drop OperatorWrap here, after we split off similar recipes to rewrite-static-analysis.

What's your motivation?

What's your motivation?

Only maintain a single copy, after adding an option:

Have you considered any alternatives or workarounds?

The copy there is looped into org.openrewrite.staticanalysis.CommonStaticAnalysis, which has likely been copied and modified since, so is harder to remove at this point.

@timtebeek timtebeek added the enhancement New feature or request label Sep 21, 2024
@timtebeek timtebeek self-assigned this Sep 21, 2024
Copy link
Contributor

@knutwannheden knutwannheden left a comment

Choose a reason for hiding this comment

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

Should we make it more convenient to supply style config when running recipes? Just so that we don't en up sprinkling convenience style options all over the place.

@timtebeek
Copy link
Contributor Author

Should we make it more convenient to supply style config when running recipes? Just so that we don't en up sprinkling convenience style options all over the place.

That might be a good idea, as I'm indeed not a fan of sprinkling options, even if the alternative is cumbersome. Not quite sure what making it easier would like though.

I did notice we also have a copy of this recipe in rewrite-static-analysis, so I'll move this change there for now, and remove the recipe here, as there's no apparent references elsewhere at this point in time.
https://github.com/openrewrite/rewrite-static-analysis/blob/main/src/main/java/org/openrewrite/staticanalysis/OperatorWrap.java

@timtebeek timtebeek changed the title Add WrapOption to OperatorWrap to change detected style easily after running once Drop OperatorWrap as there's a copy maintained in rewrite-static-analysis Sep 21, 2024
@timtebeek timtebeek merged commit 9355812 into main Sep 21, 2024
2 checks passed
@timtebeek timtebeek deleted the allow-operatorwrap-override-of-detected branch September 21, 2024 11:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants