This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-01-18
Channels
- # announcements (19)
- # babashka (30)
- # beginners (51)
- # biff (12)
- # calva (20)
- # cider (27)
- # clara (20)
- # clj-kondo (19)
- # clojure (128)
- # clojure-canada (1)
- # clojure-dev (5)
- # clojure-europe (29)
- # clojure-nl (1)
- # clojure-norway (48)
- # clojure-uk (5)
- # clojurescript (6)
- # clr (37)
- # core-async (17)
- # cursive (2)
- # data-oriented-programming (2)
- # datahike (1)
- # datomic (5)
- # emacs (22)
- # exercism (1)
- # funcool (17)
- # humbleui (15)
- # jobs (1)
- # malli (44)
- # off-topic (11)
- # podcasts-discuss (1)
- # pomegranate (1)
- # react (1)
- # remote-jobs (1)
- # shadow-cljs (25)
- # tools-build (12)
- # tools-deps (70)
- # xtdb (24)
In a deps project, is there any easy way to get clj-kondo to lint only the source paths? I can just list them manually, but it would be nice to be able to get that info from deps
Dang. Okay, thanks. I'll ask in #C6QH853H8, maybe someone has a way to print out the computed :paths
.
do you have such a high churn in source directories that you need to dynamically compute them?
It's more about being able to drop the configuration (or at least this bit of it) into a new project transparently. Also a bit of aesthetics – repeating it feels icky, computing it from a set of aliases feels tidy.
Sure, or jet. Just feels like something someone else would have wanted to do before.
Ahh, slick, thanks
you may want to tweak it a bit, like this is probably better:
$ clojure -Spath | bb -e '(take-while fs/directory? (str/split (slurp *in*) (re-pattern fs/path-separator)))'
("src" "feature-xml" "feature-yaml" "feature-csv" "feature-transit")
Even more Windows friendly:
bb -e '(take-while fs/directory? (str/split (with-out-str (babashka.deps/clojure "-Spath")) (re-pattern fs/path-separator)))'
and you could combine this with the clj-kondo pod and combine this all into one script
Never actually occurred to me to use the pod, I should definitely change my bb task to do that.
I have a noob question related to my indirect use of clj-kondo via Calva. I am using Specter, and it defines handy special values like ALL
. Specter docs recommend use
ing the library, but I don’t like to do that, so I require
it :as spctr
but also refer some useful values like ALL
. However, when I :refer [ALL]
I get a warning that says “Unresolved var: ALL”. Also all references to ALL
throughout the source file are flagged in the same way. Aside from that, everything is working fine, so clearly the refer behavior found the ALL value and correctly referred it for use in the rest of the file. So how can I avoid these spurious warnings? Thanks for any insight.
When you include this config: https://github.com/redplanetlabs/specter#clj-kondo and then restart your project, everything will work