Fork me on GitHub
#clj-kondo
<
2023-12-17
>
akis16:12:53

hi all 👋 I'm getting a :clojure-lsp/unused-public-var for a function referenced by :init-fn in shadow-cljs.edn can kondo be aware of this somehow, without resorting to suppressing? Thanks!

borkdude17:12:03

the linter depends on clj-kondo analysis, but the logic of this is implemented in clojure-lsp. I think clojure-lsp could maybe use the symbols analysis to know that the var is used. cc @UKFSJSM38

ericdallo17:12:37

Yeah, that is something to improve on that linter, please open a issue in clojure-lsp @UKDLTFSE4, if you know other things in shadow-cljs.edn that can reference vara as well, please specify

akis17:12:12

Will do, thanks guys for the fast response! 🙏

borkdude17:12:32

@UKFSJSM38 you could just ignore any var that occurs in symbol analysis maybe, not just some specific cases for shadow-cljs?

ericdallo17:12:45

Yeah, not sure if that is too aggressive, but it's a approach we could confirm if it's ok