-
Notifications
You must be signed in to change notification settings - Fork 360
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
Merge yaml test for inline comments retention #4365
Merge yaml test for inline comments retention #4365
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some suggestions could not be made:
- rewrite-gradle/src/main/groovy/RewriteSettings.groovy
- lines 31-36
Thanks for the helpful test here @johnpaulms ! What I can see from stepping through with the debugger is that the comment is attached to the |
merging this into my branch so I can take it along there |
* Added test cases to check inline comment retention. * Updated issue number to check inline comment retention. --------- Co-authored-by: j0m17kw <[email protected]> Co-authored-by: Peter Streef <[email protected]>
* Added test cases to check inline comment retention. * Updated issue number to check inline comment retention. --------- Co-authored-by: j0m17kw <[email protected]> Co-authored-by: Peter Streef <[email protected]>
* fix: `MergeYaml` block indentation not as expected * Indication where things need to change * calculate indentation * add todo * Make it work with variable indent * Fix for sequences * cleanup * cleanup * comments * extract method * revert * revert * Merge yaml test for inline comments retention (#4365) * Added test cases to check inline comment retention. * Updated issue number to check inline comment retention. --------- Co-authored-by: j0m17kw <[email protected]> Co-authored-by: Peter Streef <[email protected]> * revert * Revert all to main (to start again) * Make multiline scalars work * Cleanup * Apply suggestions from code review Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> * Add extra test `addPropertyWitCommentAboveLastLine` * Improve IndentsVisitor, so merged multiline scalars work too * Small improvements * Apply formatter * Consistently use the same style of import for nested classes * Reuse local variable `value` instead of repeated `incomingEntry.getValue()` * Small improvements --------- Co-authored-by: johnpaulms <[email protected]> Co-authored-by: j0m17kw <[email protected]> Co-authored-by: lingenj <[email protected]> Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Tim te Beek <[email protected]>
What's changed?
Added test case to test inline comment retention for mergeyaml recipe
What's your motivation?
We have same issue as described here
Anything in particular you'd like reviewers to focus on?
Nothing as of now.
Anyone you would like to review specifically?
@timtebeek @pstreef to review this test case
Have you considered any alternatives or workarounds?
There is no work around for this issue. Developers want to retain the comments in their yaml file.
Any additional context
Checklist