This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-09
Channels
- # announcements (3)
- # babashka (120)
- # beginners (87)
- # calva (7)
- # clj-kondo (35)
- # cljsrn (25)
- # clojure (94)
- # clojure-austin (4)
- # clojure-europe (53)
- # clojure-nl (2)
- # clojure-norway (6)
- # clojurescript (16)
- # conjure (8)
- # cursive (6)
- # data-oriented-programming (2)
- # data-science (19)
- # datahike (1)
- # datalevin (29)
- # datomic (13)
- # fulcro (50)
- # gratitude (1)
- # honeysql (9)
- # jackdaw (2)
- # kaocha (7)
- # leiningen (3)
- # malli (4)
- # off-topic (4)
- # polylith (3)
- # re-frame (5)
- # reagent (1)
- # releases (1)
- # reveal (4)
- # shadow-cljs (17)
- # tools-deps (10)
- # vim (17)
- # vscode (4)
- # xtdb (3)
I'm noob when it comes to configuring clj-kondo and I'm playing with guardrails: https://github.com/fulcrologic/guardrails#quick-start
Emacs complains about <defn
macro and its syntax so I'd like to fix it.
I noticed guardrails has clj-kondo config: https://github.com/fulcrologic/guardrails/tree/develop/.clj-kondo
... which links to https://github.com/fulcrologic/guardrails/tree/develop/src/clj-kondo/clj-kondo.exports/com.fulcrologic/guardrails
How can I make it work when using guardrails as a library?
Hmm, it finishes very quickly giving me this:
clj-kondo --lint "<classpath>" --dependencies --parallel --copy-configs
No configs copied.
clj-kondo --lint $(clojure -Spath) --dependencies --parallel --copy-configs
this looks betterBut it didn't help much. Do I need to restart emacs once this is done? (I just killed the buffer and opened it again)
Hmm, I can imagine the use case for it but cannot you just make people run this command in the project root anyway? (Instead of making them to run the command in the project root) Or you have a use case to run it only in subfolder(s)?
the clj-kondo binary is also used from emacs and flycheck doesn't execute it from a project root, the cwd is the file you're editing, so unfortunately no
In a couple places, I have functions like (def get-body (comp :body http/get))
. clj-kondo treats these symbols as normal symbols instead of functions. What's the best way to make clj-kondo treat this as the function http/get
? (same arg list, etc)
I think you could add it to :lint-as
although I'm not entirely sure.
oh that's a good point
i wish i could attach :lint-as
and other data directly to the var so i didn't have to worry about them getting out of sync because someone forgot lol
Yeah, understandable.
haha Yeah, I agree, but my boss is... persnickety about some stuff, so I'm hoping to just make my own life a little easier
It’s the end of the day, I might be totally overseeing something obvious, but I can’t find what’s wrong here:
$ clj-kondo --lint malli_select.clj | grep Unparsable
malli_select.clj:0:0: error: Can't parse malli_select.clj, Unparsable namespace form
~/projects/garden/malli/schema_select (master *)
$ head malli_select.clj
(ns malli-select
(:require [clojure.test :as test :refer [deftest is testing are]]
[malli.core :as m]
[malli.generator :as mg]
[malli.util :as mu]))
$ clj -M -m malli-select
Works!
Nuking the requires doesn’t fix it. Renaming file and namespace to foo
doesn’t fix it…