openrewrite / rewrite-templating

Automated templating using code snippets.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retain and insert comments added to a replacement template

timtebeek opened this issue · comments

What problem are you trying to solve?

Sometimes it's helpful to insert context to a code changes through the use of comments in a replacement template.

Describe the solution you'd like

Any comments in replacement templates, whether single line or multi line, retained and inserted along with the code change.

Alternatives

Folks can copy the generated recipe from target/ or build/ into src/ and add the comments there.

Additional context

This came up as a request through internal channels; logged as an issue here to track progress towards that.

I believe solving may go hand-in-hand with