This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-02-03
Channels
- # announcements (2)
- # atom-editor (1)
- # babashka (6)
- # beginners (49)
- # calva (39)
- # clj-kondo (20)
- # clojure (41)
- # clojure-australia (1)
- # clojure-europe (33)
- # clojure-germany (8)
- # clojure-italy (2)
- # clojure-losangeles (1)
- # clojure-norway (3)
- # clojure-spec (5)
- # clojure-uk (48)
- # clojurescript (147)
- # conjure (24)
- # core-logic (1)
- # datahike (6)
- # datomic (14)
- # emacs (10)
- # events (1)
- # fulcro (11)
- # garden (1)
- # girouette (2)
- # honeysql (16)
- # jobs (3)
- # kaocha (3)
- # malli (5)
- # meander (7)
- # off-topic (49)
- # pathom (50)
- # portal (3)
- # reagent (4)
- # reitit (7)
- # rewrite-clj (3)
- # ring (3)
- # sci (4)
- # shadow-cljs (46)
- # spacemacs (10)
- # sql (3)
- # tools-deps (57)
has someone posted a linter for the else->>
macro? It's a mind-bending piece of code and I would happily replace better-cond
if it means clj-kondo can better lint my code 🙂 https://gist.github.com/borkdude/93efc3f5978a2ed545553a47caaf7aa8
@pithyless I think it’s not hard to write a hook for this
yeah, I figured a hook for this is easier to write, than for parsing better-cond
; I was just hoping someone had already done it ;]
I'm trying out the new "unresolved var" linter. I'm wondering why it doesn't always work. Repro:
(require '[clojure.tools.namespace.repl :as t.n.r])
(t.n.r/nope)
(require '[clojure.set :as set])
(set/onion)
It reports set/onion
, but not t.n.r/nope
.@flowthing the reason (probably) is, is that clojure.tools.namespace hasn't been analyzed/linted, but clj-kondo knows about a few built-in libraries like clojure.set already
to lint this library, make a .clj-kondo dir in your project root and then lint everything using clj-kondo --no-warnings --parallel --lint <classpath>
where <classpath>
is some build-tool specific thing like $(clojure -Spath)
Hi! I have an issue that after some time of digging on it, did not found a solution. I have a macro that "reexports" some vars, so the code looks like (d/export somens/somesymthatpointstovar)
, now clj-kondo raises the warning about unresolved var when using anything that is exported using this macro. I tried to use it like lint-as
with clojure.core/declare and it does not have any effect (indeed because the warning is not caused by the macro export
; is cause by the use of the results of this macro. There are any hint on how to fix it?
@niwinz There are multiple ways to solve this.
1) You can configure the :unresolved-var
linter to turn off warnings for this namespace. See docs here: https://github.com/clj-kondo/clj-kondo/blob/master/doc/linters.md#unresolved-var.
2) You can write a hook to make clj-kondo understand your macro. See https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md.