Hello! I’m writing a custom rule with autoCorrect. To do so I need to add
.trimMargin()
after a
KtStringTemplateExpression
but I don’t know how to manipulate the psi to do that. I tried to find an example in the ktlint code base but the ones that I find doesn’t work for my use case.
Best thing that you can do is first write the code sample that you're targeting at. Then next use 'ktlint --print-ast' to output the AST you have to replicate.