I can't make lsp disable "report-duplicates". This caused some confusion between running clj-kondo from the command line and using it via clojure-lsp. Linting this file has no errors in vanilla clj-kondo:
#_:clj-kondo/ignore
(nippy/freeze 1)
(nippy/dude)
but in lsp you see an unresolved namespace on the second form.
You should be able to disable this with
{:report-duplicates false}
in lsp according to the docs.Configuring
{:linters {:unresolved-namespace {:report-duplicates false}}}
also doesn't work. I think just that should be already honored in lsp. It's unfortunate that lsp aggressively overrides clj-kondo's default config here.This lives under LSP settings :linters :clj-kondo -report-duplicates https://github.com/clojure-lsp/clojure-lsp/blob/master/lib%2Fsrc%2Fclojure_lsp%2Fkondo.clj#L263
But if kondo has a config for that on their side, we can check that too, I think at that time kondo didn't have a config, only a flag to pass, not sure
But issue / PR welcome to honor that if not working
Ah got it. {:linters {:clj-kondo {:report-duplicates false}}} I had {:report-duplicates true}.
Probably I misunderstood: https://clojure-lsp.io/settings/#clj-kondo
clj-kondo doesn't have a global "report-duplicates" setting, it's per linter as you can see in the code you pointed at and lsp will always override it with one and the same boolean from the lsp config, it seems