Fork me on GitHub

Is there a workaround for structural search for Clojure? I want to find usages of an overloaded function that is called with x number of arguments. A regex grep will be a pain, since I'll have to handle new lines and threaded forms.


No, there isn’t unfortunately. Searching for a particular arity is something that has been requested before.


Okay, thank you.

dpsutton14:07:27 allows you to "grep" a codebase with specs that include arity counts


It is sort of sidestepping the problem, but the easier migration would be to move all usages of the function to using a map with named params


that way you don't need to narrow down anything and in the future you can search for the map's keys for future revisions


I actually found an example that I can very easily build on Thanks @U11BV7MTK

👍 2

@U3JH98J4R That's too big a diff, the function has 209 usages. And my need for refactoring is for quite a different purpose.


Since cursive uses static analysis to do it's thing and IntelliJ has a nice structural search, I was wondering if it was possible for Cursive to implement it for Clojure, but I'll hack around with grasp for now