Fork me on GitHub
#clj-kondo
<
2022-03-22
>
Sam Ritchie07:03:42

hey all, I’m hitting a problem where in a project that takes sicmutils as a dependency, any namespace that tries to use a form like new-sym defined in sicmutils.env with (import-def original-value new-sym) fails to recognize sicmutils.env/new-sym, EVEN THOUGH namespaces inside the project work fine. repro here: https://github.com/sritchie/kondo-repro

Sam Ritchie07:03:43

the rule I wrote for this definitely triggers when I lint dependencies, which I would have assumed would populate the cache. The import-vars rule for potemkin on the other hand does not seem to have any trouble in this case, so I am guessing it is a problem with my hook? but weird that it only shows up in dependencies…

borkdude08:03:17

Can you create a github issue?

borkdude08:03:21

I'm busy today so no time to look at it, perhaps later this week.

borkdude08:03:15

I did notice this:

cat .clj-kondo/.cache/v1/cljc/sicmutils.env.transit.json | jet --from transit --query ':clj keys' --pretty
The principal-value var doesn't appear in there.

borkdude08:03:22

Please append that info to the issue as well.

fadrian10:03:36

How do I get rid of unused-public-var warnings in Calva? From what I gather, these come about via Calva's use of clojure-lsp, which uses a custom linter in clj-kondo to generate these. I've tried adding #clj-kondo/ignore and #{:clj-kondo/ignore [:unused-public-var]] before the statement throwing the warning, but neither of these seem to work. Any ideas?

ericdallo11:03:53

The correct linter name is :clojure-lsp/unused-public-var

ericdallo11:03:32

Also, it's a info,.not a warning

fadrian13:03:46

Sorry, forgot to send this yesterday: Thank you.

rafaeldelboni13:03:47

Hi hello, what is the best approach to create a custom kondo rule, to warn me about println and prn that I forgot in my code after a debug session?

borkdude13:03:54

A linter that would be able to catch that is https://github.com/clj-kondo/clj-kondo/issues/996 but it hasn't been implemented yet. https://github.com/clj-kondo/clj-kondo/issues/996

borkdude13:03:06

Feel free to comment/upvote it

rafaeldelboni13:03:41

That would be a nice feature

borkdude13:03:14

I mean in the issue