Replies: 1 comment 4 replies
-
Apart from a few details I think your recipe looks mostly correct and I would expect the auto-formatting to kick in. Can you tell us what version of OpenRewrite you are on? |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Requirement - Add line of code in existing method declaration
New Line To be Added
rabbitTemplate.setObservationEnabled(true);
Input Code
Modified Code
Custom Recipe
Built new custom recipe to achieve same and it's able to add new line correctly but recipe test is always failing due to mismatches in formatting. In fact, test is changing formatting for "expected" java code too.
Issue
Recipe is modifying method code to add line ax expected but added line is not having proper format and test case is failing due to same. I have tried adding "maybeAutoFormat" as shown in recipe code below but still no success.
Recipe Code
Recipe Test Code
Failure Trace is attached in file
assertionFailedError.txt
Beta Was this translation helpful? Give feedback.
All reactions