Is there a macro that follows the (deffoo ::some-keyword args & form … pattern that can be used as a lint-as option? Trying to think of an example of that in regular clojure.
It’s basically a defn with a keyword instead of a symbol
This has come up a couple of times but I don't think there is any macro in core that uses a keyword to define a var. I also don't understand why you would do this btw
It’s a macro in an existing project.
which one?
A closed source one
For work.
ok. no solution here. write a hook :macroexpand will be the easiest, :analyze-call will be the most accurate
Ahh, hooks can’t be inline. I guess I’ll see if the macro can be changed/refactored to use a symbol instead of a keyword. Might be less work. Is the main reason clj-kondo can’t macro expand itself security?
I remember I think it was fennel can macroexpand with the linter as lua can sandbox
the main reason is that most macros need context and aren't pure functions
like, they need context about other vars in other namespaces, aliases, etc
Ah yeah that makes sense.