-
Notifications
You must be signed in to change notification settings - Fork 356
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When merging yaml files comments on the last element of existing bloc…
…k are placed at the wrong line (#4671) * Add `existingEntryBlockWithComment` test * Cleanup MergeYaml code * Little progress... * Little progress... * improvement * improvement * improvement * Fix null Yaml.Document.End objects * improvement * got it first working * improvement * improvement * why?? * Add more logging * Got comment working * Improvement * Improvement * Found a non-working test case... * Fix non-working test case... * Remove test no longer needed * Improvement * Dont replace comments when cursor is a root level * Put Yaml prefixes back * More comment, more difficult * Improvement * Improvement of test * Use System.lineSeparator() * improvement * Add `existingEntryBlockWithComment` test * Cleanup MergeYaml code * Little progress... * Little progress... * improvement * improvement * improvement * Fix null Yaml.Document.End objects * improvement * got it first working * improvement * improvement * why?? * Add more logging * Got comment working * Improvement * Improvement * Found a non-working test case... * Fix non-working test case... * Remove test no longer needed * Improvement * Dont replace comments when cursor is a root level * Put Yaml prefixes back * More comment, more difficult * Improvement * Improvement of test * Use System.lineSeparator() * improvement * Update rewrite-yaml/src/main/java/org/openrewrite/yaml/MergeYamlVisitor.java Co-authored-by: Jacob van Lingen <[email protected]> * Don't use CRLF on Windows unless that is the style of the yaml document being refactored. --------- Co-authored-by: Sam Snyder <[email protected]>
- Loading branch information
1 parent
01813e3
commit a586c31
Showing
6 changed files
with
370 additions
and
48 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.