Fork me on GitHub
#clj-kondo
<
2023-01-31
>
chrisetheridge07:01:03

this is unexpected, right? #include … works here, but i get the warning

.clj-kondo/config.edn:38:21: warning: Expected a map, but got: list

borkdude10:01:27

#include is an undocumented feature and should be considered unsupported

chrisetheridge10:01:33

ah cool, fine with that!

Noah Bogart19:01:51

After experimenting with a built-in linter for syntax-quote checking in :unresolved-namespaces (https://github.com/clj-kondo/clj-kondo/pull/1969), I was hoping to write this in a hook on with-meta. Sadly, there seems to be no namespace/required data passed to hooks, so I can't perform the check myself. Is this something you could expose to hooks?

borkdude21:01:10

Can you be more specific about what data?

Noah Bogart21:01:12

i'd like to be able to look at all of the namespaces that are currently aliased or required, and all of the vars that are referred in the current namespace.

borkdude21:01:10

issue welcome. there is already one function called ns-analysis which may come close to what you want

borkdude21:01:17

check the hook docs

Noah Bogart21:01:28

oh I didn't know about that. I'll check it out, thanks

Noah Bogart21:01:41

I was expecting the info to live on the passed in object

borkdude21:01:24

ns-analysis has a slightly different use case: it reads from the cache of already analyzed files

👍 2