This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2024-07-26
Channels
- # announcements (7)
- # babashka (10)
- # beginners (6)
- # clj-kondo (2)
- # cljsrn (4)
- # clojure (112)
- # clojure-australia (1)
- # clojure-conj (5)
- # clojure-europe (22)
- # clojure-korea (3)
- # clojure-miami (1)
- # clojure-norway (7)
- # clojure-uk (5)
- # clojurescript (13)
- # conjure (8)
- # data-science (1)
- # docker (1)
- # events (1)
- # fulcro (47)
- # gratitude (11)
- # hyperfiddle (37)
- # jobs (3)
- # malli (25)
- # off-topic (7)
- # portland-or (1)
- # releases (1)
I'm working on a new feature in clj-kondo that detects if a macro is used as a value.
$ clj -Sdeps '{:deps {clj-kondo/clj-kondo {:git/sha "96344bd32257afdebf19ee634999c397000c1aa0" :git/url ""}}}
' -M -m clj-kondo.main --lint - <<< '(inc let)'
:1:6: error: Can't take value of a macro: clojure.core/let
linting took 48ms, errors: 1, warnings: 0
Please test it out. I'm not sure if the balance between helpful and annoying is ok-ish since there are macros that just receive unquoted symbols that sometimes refer to macros, e.g.:
(my-cool-macro [binding 10]) ;; Can't take the value of a macro: clojure.core/binding
So it might be good to test this over your codebase and report false positives to me.This is the issue: https://github.com/clj-kondo/clj-kondo/issues/1725