Fork me on GitHub
#lsp
<
2022-05-12
>
lassemaatta06:05:50

What's the proper way to use :clojure-lsp/unused-public-var & exclude-when-defined-by? I have a def-like macro (`devcards.core/defcard-rg`), and I'd like to get rid of unused public var warnings

ericdallo12:05:25

that's the correct way

ericdallo12:05:55

unless you configured clj-kondo to lint devcards.core/defcard-rg as something else I think, is your project public?

lassemaatta12:05:09

Ah, that might be the reason. In any case, we decided to ditch the library in question so that sort of solves the problem :)

👍 1
orestis06:05:41

I'm having the same issue with a similar macro

orestis06:05:16

:lint-as {
           nosco.views.design-system-utils/defsection clojure.core/def
           }

orestis06:05:57

:linters {
:clojure-lsp/unused-public-var
 {:level                   :warning
:exclude-when-defined-by #{nosco.views.design-system-utils/defsection}}}

orestis06:05:14

(excuse the weird formatting, i snipped some items out)

orestis06:05:33

Within Calva, I still see warnings about defsection stuff

ericdallo12:05:15

Do you have a repro with that macro @U7PBP4UVA? So I can try

orestis13:05:12

What's the best way to share? Upload files here? Or an issue?

ericdallo13:05:20

if you manage to provide a sample project, would be the best

ericdallo13:05:39

if I manage to repro the issue, probably a issue will makes sense