This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-09
Channels
- # announcements (1)
- # babashka (14)
- # calva (8)
- # chlorine-clover (3)
- # clerk (6)
- # clj-kondo (27)
- # cljdoc (20)
- # clojars (6)
- # clojure (53)
- # clojure-denver (8)
- # clojure-europe (17)
- # clojure-nl (1)
- # clojure-norway (270)
- # clojure-uk (5)
- # clojurescript (35)
- # community-development (7)
- # cursive (12)
- # datalevin (3)
- # datomic (26)
- # etaoin (23)
- # exercism (1)
- # hyperfiddle (3)
- # java (14)
- # nrepl (2)
- # off-topic (12)
- # pathom (3)
- # portal (44)
- # practicalli (2)
- # reagent (7)
- # releases (1)
- # shadow-cljs (13)
- # timbre (3)
- # xtdb (4)
$ echo "(let [a 1] (let [b 2] (+ a b)))" | clj-kondo --lang cljc --lint -
<stdin>:1:13: warning: Redundant let expression. [:redundant-let]
linting took 14ms, errors: 0, warnings: 1
should this report twice? when does clj-kondo report a given error in a cljc file twice?Hello! Just to make sure I got it right how to write hooks: https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md#custom-lint-warnings hooks don't need to return a map with :node
, right?
Using typed.clojure is giving me a lot of kondo error noice using doom emacs +lsp. I have tried with a config.edn containing:
:config-in-call
{typed.clojure/ann {:linters {:ignore true}}
typed.clojure/defalias {:linters {:ignore true}}
typed.clojure/I {:linters {:ignore true}}
but I still get warnings/errors. Any ideas?
You are of course right abut the :linters key, but I still get warnings and errors in calls to the fucntions/macros. I have deleted both the .lsp folder and the kondon .cache folder. Should it not be ignoring all symbols in and vars inside calls to those functions/macros?
I think so yes, but I'm about to go to sleep. Meanwhile it would be helpful if you could provide a small repro in the form of a github repo that I could clone and try locally perhaps
So one discovery is that the config.edn works as intended with VS Code but not with emacs.
I don't think so. I get this: ❯ clojure-lsp --version
clojure-lsp 2023.06.04-19.00.17-nightly
clj-kondo 2023.06.02-SNAPSHOT
but perhaps emacs is using something different?
I am getting progress now. I think I had done something silly with lint-as on top of ignoring. There is just one .clj-kondo dir 🙂
Is there a good solution to dealing with unresolve vars due to macro generated functions?
There are several ways to do it. https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#unrecognized-macros
yeah in that case a hook is probably the best. the :macroexpand
hook supports copy-pasting your macro (and usually, simplifying it, just for clj-kondo purposes). Or of the syntax looks like something else, you can use :lint-as
, like {:lint-as {your.ns/def-somethings clojure.core/declare}}