hi. small question that came up at clj-kondo and I wonder how joker thinks about it:
if you write 'foo/bar
or
`foo/bar
or
(quote foo/bar)
how should that affect linting ununsed namespaces? In Clojure, you do not need to require namespace foo
in either case, although joker counts foo
as used in the case of the syntax-quoteIn the case of protocol metadata, there is something you're implementing though. And maybe you are expecting something else to use it.
@dominicm were you responding to my question? can you give an example - what do you think the behavior should be?
I was, yeah 🙂 Don't have a strong opinion, just weighing in that:
(with-meta obj {`foo/bar (fn [this] …)})
foo/bar
is used, but it isn't directly called by my library (necessarily).oh, I guess this is about unused-require vs unused-ns? Is there an unused-ns?
unused-require I mean yes
maybe syntax-quote is a good to choice to count the namespace as used, e.g. in writing macros, you’ll often want to load the namespaces, even if you’re only generating code that will use those namespaces and you’re not using them at macro definition time
so from that angle, joker’s behavior makes total sense
The ' makes no sense though, the require has nothing to do with that