As the other sibling commenter said, both `ast-grep` and `gritql` are based on Treesitter which means that you can in fact just look for certain function call and it will be found no matter how it's formatted, something that plain grep and sometimes semgrep I am not sure can do.
I have used `ast-grep` to devise my own linters with crushing success.
I have used `ast-grep` to devise my own linters with crushing success.