Fork me on GitHub
#clj-kondo
<
2022-01-16
>
lispers-anonymous15:01:43

I am attempting to write a custom clj-kondo hook. I have a token node that is a symbol that looks like foo/bar such that foo is an alias for another namespace like some-library.api.foo . Is there a way I can get the information to fully expand that namespace part of the symbol, so that I now have some-library.api.foo/bar as the symbol?

borkdude15:01:31

@UDVJE9RE3 currently not, but could you describe the macro a little bit? usually macros don't need to resolve alias, they just emit

lispers-anonymous15:01:07

I'm not doing anything with a macro. Here is the hook setup in my config.edn :hooks {:analyze-call {re-frame.core/reg-event-fx lispers-anonymous.re-frame.sub-in-event-handler/hook}} I'm trying to emit a warning when some calls re-frame.core/subscribe inside of a re-frame event.

borkdude15:01:52

currently not possible, but feel free to post an issue

lispers-anonymous15:01:08

Sure I can do that. This is not something blocking me up, as the project I'm hoping to use this in is pretty consistent in the namespaces it uses. Turing on the :consistent-alias in conjunction with my current hook, and explicitly checking for the symbol rf/subscribe will be more than enough.

lispers-anonymous15:01:14

Thanks for the quick response this morning. I opened up an issue here: https://github.com/clj-kondo/clj-kondo/issues/1546