This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-05-29
Channels
- # announcements (1)
- # babashka (83)
- # beginners (67)
- # chlorine-clover (22)
- # cider (11)
- # circleci (6)
- # clj-kondo (12)
- # cljs-dev (137)
- # cljsrn (15)
- # clojure (124)
- # clojure-europe (40)
- # clojure-italy (1)
- # clojure-nl (3)
- # clojure-norway (1)
- # clojure-serbia (3)
- # clojure-spec (19)
- # clojure-uk (14)
- # clojuredesign-podcast (5)
- # clojurescript (80)
- # conjure (49)
- # core-async (62)
- # cursive (18)
- # datascript (1)
- # datomic (64)
- # docker (28)
- # emacs (20)
- # figwheel-main (249)
- # fulcro (95)
- # graalvm (2)
- # jobs-discuss (11)
- # joker (2)
- # juxt (4)
- # lambdaisland (9)
- # leiningen (1)
- # meander (14)
- # mount (6)
- # off-topic (16)
- # pathom (46)
- # re-frame (35)
- # reagent (6)
- # reitit (5)
- # shadow-cljs (28)
- # spacemacs (6)
- # sql (18)
- # tools-deps (26)
- # vim (8)
- # xtdb (23)
- # yada (1)
hello, I got in a situation here that I'm not sure how to get out, considering this code:
(let [init-link-events (mapv (fn [cid]
[::command-init-link
{::client-id cid}]) (range clients))]
(gen/let [chain-size (gen-chain-size env)
command-chain (gen-command (-> env
(assoc ::chain-size chain-size)
#_(update ::command-pool into init-link-events)))]
(into init-link-events (chain->list command-chain))))
Kondo thinks there is a redundant let here, but its not really, I understand that for kondo they are just 2 lets, is there a way to avoid this problem?gen/let
vs let
and in my setup gen/let
is configured to be resolved as let
hmm, I think we need to tweak the code to disregard things that are linted as let, but are not really clojure.core/lets
@wilkerlucio a workaround for now would be to lint gen/let as core/with-open or something
@borkdude sure, you think this is more a bug or feature request? I'm not sure
I think for the redundant let check we should only look at clojure.core/let only, so I would say it's a bug in that linter
cool, another details that I got now:
- clojure.test.check.generators/let
is already recognized by kondo (before I said I had configured, but I hadn't)
- Trying to make it work as with-open
didn't fix got around it
I also made a proposal for built-in support for core.match into clj-kondo for Summer of Bugs. https://github.com/borkdude/clj-kondo/issues/496 Please upvote the issue with a thumbs up if you'd like to see support for it.