I’m having some config to ignore an unresolved symbol in one particular namespace. My editor integration picks it up correctly but when ran with --config
on the CLI it seems the namespace specific configuration is ignored. Is this intentional?
That did the trick. Seems a little surprising to me though? Why does the quoting only work in this one place?
@martinklepsch Because clj-kondo doesn't evaluate code
the quotes are just there to please the clojure who is running the code
clj-kondo just reads it as a plain EDN sexprs
but for compatibility it supports the outer quote
{:clj-kondo/config {:linters
{:unresolved-symbol
{:exclude [sentry]}}}}
This is the piece of config. Interestingly my editor integration does NOT pick this up correctly with quotes. ie. '[sentry]
Try quoting the entire config: '{:linters ...}
The config should never contain inner quotes.
@martinklepsch So this works:
(ns foo
{:clj-kondo/config '{:linters
{:unresolved-symbol
{:exclude [sentry]}}}})
(map sentry [1 2 3])
Playing around with the type stuff foo2 gives a warning, foo1 does not, does this warrant an issue?
@sfyire This does work: (defn foo1 [^long s]) (foo1 "get")
. But adding Integer
to map to :int
would be good I think
So issue welcome
cool placed it here: https://github.com/borkdude/clj-kondo/issues/910
thanks