top | item 41679861

(no title)

mhw | 1 year ago

I’ve been looking at codemod tools recently, just as a way to extend my editing toolbox. I came across https://ast-grep.github.io/, which looks like it might address part of this problem. My initial test case was to locate all calls to a method where a specific argument was ‘true’, and it handled that well - that’s the kind of thing an IDE seems to struggle with. I’m not yet sure whether it could handle renaming a variable though.

I guess what I’m looking for is something that

* can carry out the kind of refactorings usually reserved for an IDE

* has a concise language for representing the refactorings so new ones can be built quite easily

* can apply the same refactoring in multiple places, with some kind of search language (addressing the task of renaming a test parameter in multiple methods)

* ideally does this across multiple programming languages

discuss

order

No comments yet.