This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-01-11
Channels
- # ai (1)
- # announcements (59)
- # aws (3)
- # babashka (16)
- # beginners (36)
- # calva (29)
- # cider (7)
- # clj-kondo (33)
- # clojure (77)
- # clojure-austin (1)
- # clojure-australia (4)
- # clojure-europe (16)
- # clojure-france (7)
- # clojure-nl (2)
- # clojure-spec (1)
- # clojure-sweden (8)
- # clojure-uk (4)
- # clojurescript (17)
- # cloverage (4)
- # conjure (2)
- # cursive (3)
- # datomic (22)
- # emacs (16)
- # fulcro (10)
- # graphql (3)
- # helix (13)
- # jobs (1)
- # kaocha (1)
- # lsp (7)
- # malli (1)
- # nextjournal (1)
- # off-topic (32)
- # pedestal (8)
- # polylith (5)
- # reitit (4)
- # reveal (1)
- # shadow-cljs (67)
- # spacemacs (7)
- # tools-deps (6)
- # xtdb (4)
When using clojure-lsp in emacs, if I have an unused function then lsp will show me a clojure-lsp/unused-public-var warning. Is there a way to also show this warning for unused re-frame events and subscriptions? I can see when one of these re-frame handlers has 0 references, but clojure-lsp doesn't register that as any kind of warning.
I doubled checked clojure-lsp code and we didn't exclude re-frame handlers or subscriptions, it should warn as unused
oh, I think re-frame is considered a :keyword
not a :var-definition
on kondo-eyes, I think that's the reason for we don't check for unused public vars for reg-*
That would make sense, I guess the functionality I want would need to be enabled in clj-kondo somehow, probably with a code change
what I think it makes sense is to fix clojure-lsp to consider those keywords as var definitions and then clojure-lsp will warn by default the unused-public-var like it does for other definitions, if user doesn't want that it can still be changed via the linters clj-kondo config normally
I would be happy to. Edit: here it is https://github.com/clojure-lsp/clojure-lsp/issues/691