clj-kondo 2025-09-24

I'm struggling with understanding why clj-kondo isn't picking up my hook. I have a hook in .clj-kondo/hooks/dompa.clj file that looks as follows:

(ns hooks.dompa
  (:require [clj-kondo.hooks-api :as api]))

(defn $ [{:keys [node]}]
  (let [[sym props :as expr] (rest (api/sexpr node))]
    (when-not (keyword? sym)
      (api/reg-finding! (-> (meta node)
                            (merge {:message "First arg to $ must be a keyword."
                                    :type :dompa.utils/$-arg-validation}))))))
Then in .clj-kondo/config.edn I have this:
{:hooks {:analyze-call {dompa.utils/$ hooks.dompa/$}}
 :linters {:dompa.core/$-arg-validation {:level :warning}}}
And yet when I run it clj-kondo --lint src --debug with use of my macro where the sym is not a keyword, I get:
PS C:\Users\asko\Code\dompa> clj-kondo --lint src --debug
[clj-kondo] Linting file: src\dompa\coordinates.cljc
[clj-kondo] Linting file: src\dompa\html.cljc
[clj-kondo] Linting file: src\dompa\nodes.cljc
[clj-kondo] Linting file: src\dompa\utils.cljc
linting took 86ms, errors: 0, warnings: 0
In other words: nothing. If I run a prn inside the hook, it does print in the console so clj-kondo seems to actually run the file, but I can't seem to connect the hook to the actual linting of the wrong usage. It also doesn't seem to pick anything up in my editor. Edit: of course as I write this out for everyone to read I solve the problem instantly. My problem was in wrong namespace for the :type in reg-finding!. I added :dompa.utils but then in config.edn referenced :dompa.core. This solved it. Sorry for the noise.

7
✅ 1