This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-12-11
Channels
- # adventofcode (108)
- # announcements (4)
- # aws (11)
- # babashka (39)
- # beginners (199)
- # calva (12)
- # clj-kondo (17)
- # cljs-dev (1)
- # clojure (115)
- # clojure-dev (9)
- # clojure-europe (98)
- # clojure-italy (17)
- # clojure-nl (4)
- # clojure-norway (3)
- # clojure-seattle (7)
- # clojure-sweden (6)
- # clojure-switzerland (5)
- # clojure-uk (15)
- # clojurescript (41)
- # code-reviews (36)
- # conjure (7)
- # datomic (1)
- # emacs (1)
- # events (1)
- # fulcro (26)
- # graalvm (2)
- # helix (35)
- # jackdaw (2)
- # jobs (9)
- # jobs-discuss (5)
- # lambdaisland (2)
- # meander (24)
- # off-topic (80)
- # pathom (22)
- # pedestal (1)
- # portal (20)
- # re-frame (3)
- # releases (1)
- # reveal (13)
- # rewrite-clj (1)
- # shadow-cljs (8)
- # specter (5)
- # sql (4)
Hi everyone, small question: using both kondo and joker in emacs currently, but thinking about getting rid of joker. Is kondo a full replacement currently or still better to keep 2 linters?
I have been running joker alongside clj-kondo (since I started with joker and then was inspired to build clj-kondo) and I think it would be safe to say that clj-kondo covers 99% of joker and offers a ton more linters. There might be very minor things like (let [])
(warn on empty body in let) that are not in clj-kondo due to nobody asking for it but those are easy to add.
Naive question: Is the fact that a dissoc on a record’s field returns a map instead of a record lint-worthy? Or is this something folks do normally and intentionally?
(defrecord MyRecord [field1 field2])
(def r (->MyRecord "22" "23"))
(dissoc r :not-a-field)
;; => #user.MyRecord{:field1 "22", :field2 "23"}
(dissoc r :field1)
;; => {:field2 "23"}
I was not thinking of a warning on the first dissoc... was just trying to show a record was returned in that case.
but maybe wanting to convert a record to a map in this way is a normal thing? I am too naive to know. 🙂
Most common bug of this kind I see is:
(defrecord DBComponent [conn-opts db]
component/Lifecycle
(start [this] …)
(stop [this] (dissoc this :db)))
I don't remember if it matters in that exact position, but I think it's warned about.