This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-06-25
Channels
- # babashka (31)
- # beginners (38)
- # biff (1)
- # calva (10)
- # clj-kondo (10)
- # clj-otel (9)
- # clojure (9)
- # clojure-europe (4)
- # clojure-norway (4)
- # clojurescript (26)
- # cursive (2)
- # datahike (3)
- # datomic (4)
- # emacs (6)
- # inf-clojure (2)
- # missionary (11)
- # nbb (3)
- # off-topic (9)
- # portal (17)
- # re-frame (16)
- # reagent (1)
- # releases (3)
- # shadow-cljs (5)
- # tools-build (17)
- # tools-deps (2)
- # xtdb (6)
Is it possible to exclude a var from :unexpected-recur
similar to {:linters {:unresolved-var {:exclude [foo]}}}
?
I am trying to use the loopr
macro which was recently introduced here by @p-himik (see https://clojurians.slack.com/archives/C8NUSGWG6/p1656081475345209 ), but I get an “Unexpected usage of recur” warning from clj-kondo since it is not in tail position. I tried :unexpected-recur {:exclude [(dom-top.core/loopr)]}
, but it does not seem to work.
@peterhfmnn A better solution might be to use {:lint-as {custom.ns/loop clojure.core/loop}}
This gets rid of the “Unexpected usage” error, but unfortunately not the “Recur can only be used in tail position” error, since there is a final form underneath the recur
call. Maybe I have to build a custom hook?
There is also :config-in-call
where you can define a complete new configuration and disable this linter
If you only use this function sporadically, you can also use #_:clj-kondo/ignore
before the warning