Skip to content

Conversation

@timtebeek
Copy link
Member

@timtebeek timtebeek commented Sep 21, 2024

What's changed?

Add WrapOption wrapOption to OperatorWrap, and change from a static visitor to an inline visitor. The actual code changes are a lot smaller when ignoring whitespace.

What's your motivation?

Projects often rely on detection, or the default which matches CheckStyle. Yet when you want to change or enforce a new standard, it's cumbersome to have to configure a style for every project when you just want to change what's used once, and henceforth rely on detected style again.

Have you considered any alternatives or workarounds?

Any additional context

Discovered that we had a duplicate still in openrewrite/rewrite:

@timtebeek
Copy link
Member Author

With a quick local run this indeed does what I'd hoped it would do on openrewrite/rewrite
image

Perfect then for inclusion into our OpenRewrite best practices, for enforcement on PRs.

@timtebeek timtebeek merged commit 811af2d into main Sep 21, 2024
@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

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants