You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello!
The problem is that the behavior of the RemoveContentVisitor method has changed, a property has been added there (removePrecedingComment), and this property is set as "true" by defalut. This behavior breaks recipes, this property should be configured in RemoveProperty.
The text was updated successfully, but these errors were encountered:
We consider this new default to be the least surprising to users, but there is of course chance that a comment would be removed that you'd have rather retained. Perhaps for those cases you can provide your own recipe that copies these lines but retains the comment by overriding the default:
We try not to replicate these options across all recipes, as otherwise each recipe touched in #4554 would get a new optional argument; that's perhaps a bit much for a handful lines of code.
I hope that gives you enough of a way forward; I'll monitor replies here in case there's a convincing case to change things still, but otherwise consider this issues as not directly actionable, as the default indeed changed.
What version of OpenRewrite are you using?
I am using
How are you running OpenRewrite?
What is the smallest, simplest way to reproduce the problem?
What did you expect to see?
What did you see instead?
Hello!
The problem is that the behavior of the RemoveContentVisitor method has changed, a property has been added there (removePrecedingComment), and this property is set as "true" by defalut. This behavior breaks recipes, this property should be configured in RemoveProperty.
The text was updated successfully, but these errors were encountered: