Preserve code structure after replacement? #1514
Replies: 2 comments
-
ast-grep will not format the code. Using a linter/formatter along with it is a better choice. |
Beta Was this translation helpful? Give feedback.
0 replies
-
That's what I thought, thank you for confirming |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Playground
I am looking for a way to preserve code formatting after ast-grep replacements. For instance, if I have the following code:
and the following rule:
then the output is this:
while I would like it to be this:
Is there a way to do this that wouldn't require me to write the patterns and fixes with this indentation?
Beta Was this translation helpful? Give feedback.
All reactions