This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-05-04
Channels
- # announcements (1)
- # architecture (7)
- # beginners (44)
- # biff (11)
- # calva (15)
- # cider (5)
- # clerk (9)
- # clj-kondo (20)
- # clj-on-windows (19)
- # clj-yaml (2)
- # cljs-dev (39)
- # clojure (52)
- # clojure-czech (2)
- # clojure-dev (11)
- # clojure-europe (28)
- # clojure-hamburg (10)
- # clojure-hungary (3)
- # clojure-nl (1)
- # clojure-norway (59)
- # clojure-uk (5)
- # clojured (2)
- # clojurescript (33)
- # conjure (2)
- # datahike (1)
- # datomic (5)
- # defnpodcast (5)
- # emacs (18)
- # figwheel (2)
- # funcool (6)
- # graphql (1)
- # hyperfiddle (11)
- # jobs (3)
- # joyride (13)
- # malli (6)
- # music (4)
- # off-topic (45)
- # polylith (11)
- # practicalli (3)
- # rdf (3)
- # releases (1)
- # scittle (8)
- # shadow-cljs (13)
- # specter (2)
- # squint (8)
- # testing (6)
- # tools-deps (21)
- # xtdb (2)
How can I suppress unused-public-var
for a macro that creates tests with some parameters (i. e. defmytest name [bindings]
)? Currently I’m using lint-as
with def-catch-all
or defn
but that creates this unused public var warning.
if you cannot, you can try https://clojure-lsp.io/settings/#clojure-lspunused-public-var
Can clj-kondo catch with-redefs
mismatch of the number of params comparing to the original function?
Let’s say I have a function a
that takes 4 parameters. I then make a refactor so now it takes 5 parameters.
At the same time I have a test where it is redefined as (with-redefs [a (fn [_ _ _ _] mock-value)] …)
, can clj-kondo warn that here it needs to be updated to take 5 params?
Will something as simple as this work?
(defn x [a b] (+ a b))
(defn y [] (x 10 20))
(with-redefs [x (fn [a] a)] (y))
This currently isn't supported yet, but could be nice enhancement, please post an issue if you wish

I would like to suggest clj-kondo to support regex in the analyze-call
, something like
{:hooks {:analyze-call {"my-project/.*/some-fn" some-dep/some-fn}}}
I have a case at work where we have a lot of namespaces that have to be included in the analyze-call
list, and also a new use case that we have the project name in the namespace, so it is get harder to make this list generic without having something like a regex.
What do you think?There is a concept in the config called :ns-groups
. You can make an ns group based on a regex pattern and then use that group name in the config. We could extend that to here too

Cool! This solution sounds good!
I'll open an issue.. thank you!
How can one ask clj-kondo to give a warning about an unused global declaration ?
I have a function which is not used anywhere, and I would like clj-kondo to give me a warning about it.
I run clj-kondo as git commit hook like clj-kondo --lint src
, it uses a config file from .clj-kondo/config.edn
. Ideally I want to add a keyword in that config under :linters which does that.
either use: • https://github.com/borkdude/carve • clojure-lsp unused-vars both are based on clj-kondo
you should be able to run it with lein as well: similar to this: https://github.com/clj-kondo/clj-kondo/blob/master/doc/jvm.md#leiningen