This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-12-12
Channels
- # adventofcode (42)
- # aleph (10)
- # announcements (1)
- # asami (138)
- # babashka (7)
- # beginners (7)
- # biff (13)
- # cider (7)
- # clj-kondo (15)
- # clojure (53)
- # clojure-austin (11)
- # clojure-belgium (2)
- # clojure-europe (23)
- # clojure-nl (1)
- # clojure-norway (55)
- # clojure-sweden (5)
- # clojure-uk (4)
- # cryogen (7)
- # cursive (63)
- # datomic (5)
- # eastwood (6)
- # emacs (31)
- # fulcro (7)
- # hyperfiddle (9)
- # introduce-yourself (3)
- # java (11)
- # lsp (10)
- # malli (14)
- # membrane (35)
- # off-topic (13)
- # portal (12)
- # prelude (1)
- # releases (2)
- # ring-swagger (27)
- # shadow-cljs (8)
- # timbre (25)
would clj-kondo be able to catch fn calls that take predicates/fn argument but get a macro passed instead? ex : (apply or [...])
in general it should catch "cannot pass macro as a value" I think. I made an attempt at this at one point, but it was more difficult than I thought :) could have a stab at it again
I think this could now possible be solved via the type system. If a var has type :macro
and any argument to a non-macro has type :macro we could warn, or so
Would it be useful also to make suggestions in specific cases? ex: (some identity)
for (apply or)
?
I seem to be experiencing an issue where a namespace require is considered unused, but I am in fact using it.
(ns foo (:require [my-ns :as my-alias])) (do-something-with-symbol 'my-alias/bar)
hook question/request: I'd like to be able to check if an object is a var. when i print it, it says <var: #'my-var>
, and if i print the type, it says clj_kondo.impl.rewrite_clj.node.reader_macro.ReaderNode
, but I can't check (instance? clj_kondo.impl.rewrite_clj.node.reader_macro.ReaderNode obj)
because sci can't resolve that. i just realized i can check the :tag
, but is that the right way to do it? (= :var (:tag obj))
Cool, thank you