This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
- # announcements (32)
- # aws (7)
- # babashka (2)
- # babashka-sci-dev (1)
- # beginners (25)
- # biff (1)
- # calva (1)
- # cider (27)
- # clj-kondo (15)
- # clojure (24)
- # clojure-berlin (1)
- # clojure-czech (4)
- # conjure (9)
- # cursive (7)
- # datalevin (1)
- # emacs (19)
- # events (1)
- # gratitude (1)
- # integrant (1)
- # introduce-yourself (2)
- # java (4)
- # meander (17)
- # membrane (4)
- # podcasts (1)
- # releases (1)
- # remote-jobs (2)
- # ring-swagger (8)
- # shadow-cljs (14)
- # testing (1)
- # tools-build (5)
- # tools-deps (3)
potentially silly Q - if I have a dependency like https://github.com/gfredericks/test.chuck that has its own clj-config in it, how can I get clj-kondo to see that dependency? I’ve bumped the dep in project.clj;
but I also have a deps edn so I suspect kondo is looking there. but under what alias?
(since I don’t want to declare this as a dependency that others have to pull when they pull the library)
Perhaps https://github.com/clj-kondo/clj-kondo/blob/master/doc/config.md#importing is of help?
I think you might be able to generate an appropriate classpath for clj-kondo by using the appropriate deps. (Don't know or sure. Just suggesting avenues to look at).
for sure, that is what I was counting on, I am just not sure how clj-kondo is building its classpath…
The example command in the section of the documentation is
$ clj-kondo --copy-configs --dependencies --lint "$(clojure -Spath)". So, I'm guessing that the classpath is actually generated by
"$(clojure -Spath)" and you could change that to
"$(clojure -Spath -A:test)"
Indeed, @U0AT6MBUL’s correct
Is it possible to emit a binding form like
(let [x 'x y 'y z 'z] …)
from a hook… but to suppress any unused binding warnings with metadata applied inside the hook?
I have a macro that expands calls like this:
into this (the actual macro does more with the values of course):
(let-coordinates [[x y z] m/R3-rect [x0 y0] m/R2-rect] (+ x y z))
the idea is that all of these symbols will be bound and available inside of the binding, but if they’re not used, no problem. I am seeing lots of warnings like
(let [R3-rect (quote R3-rect) R2-rect (quote R2-rect) x (quote x) y (quote y) z (quote z) x0 (quote x0) y0 (quote y0) d:dx (quote d:dx) d:dy (quote d:dy) d:dz (quote d:dz) d:dx0 (quote d:dx0) d:dy0 (quote d:dy0) dx (quote dx) dy (quote dy) dz (quote dz) dx0 (quote dx0) dy0 (quote dy0)] (+ x y z))
src/sicmutils/calculus/coordinate.cljc::: warning: unused binding R2-rect src/sicmutils/calculus/coordinate.cljc::: warning: unused binding d:dy0 src/sicmutils/calculus/coordinate.cljc::: warning: unused binding dy0 src/sicmutils/calculus/coordinate.cljc::: warning: unused binding d:dx
so ideally I would suppress all of them, or maybe all except the ones that appear in the initial form like
x y z x0 y0… but the linted version is still quite useful, since inside the body
d:dt etc will not show up as unresolved symbols
ah! nice, so just emit the full list of them in a vector, for example?