fix: comments must not break rewritten assertions - #1112
Conversation
|
@timtebeek before trying to come up with a fix I wanted to check with you what a good solution would look like (the one I gave in the test is not necessarily it). I think technically the issue is that the whitespace rewriting seems not to take linebreaks into account, which can break single line comments (like in the test example). We could of course try to fix that, or we could may convert the single line comments to multi-line ones |
|
hi! I'm about to take some time off, so I'll respond briefly, but recommend colleagues for further follow up. I'd lean towards keeping the comments in place at the end, and turning |
What's changed?
The
AssertToAssertionsrecipe currently does not handle comments correctly when reordering arguments, which can lead to compilation errors after applying the recipe.What's your motivation?
Anything in particular you'd like reviewers to focus on?
Anyone you would like to review specifically?
@timtebeek
Have you considered any alternatives or workarounds?
Any additional context
Checklist
./gradlew buildlocally, and committed any resulting changes torecipes.csv