Is it disallowed to have a macro and an :analyze-call hook for that macro in the same namespace?
Conclusion: not really, but hooks must be in the .clj-kondo-directory, and you probably don't want your own application code in that folder.
I'm asking because I have just that, and I'm unable to tell Kondo how to find my hook:
$ head -n 9 kondo_hooks_for_application_programmers.clj
^{:nextjournal.clerk/visibility {:code :fold :result :hide}}
(ns kondo-hooks-for-application-programmers
{:nextjournal.clerk/toc true
:clj-kondo/config
'{:hooks
{:analyze-call
{kondo-hooks-for-application-programmers/defgrinning
kondo-hooks-for-application-programmers/defgrinning-hook}}}}
(:require [clojure.string :as str]))
$ ls
deps.edn kondo_hooks_for_application_programmers.clj
index.edn kondo-does-not-understand-it.png
index.html play.edn
$ cat deps.edn
{:paths ["."],
:deps {clj-kondo/clj-kondo {:mvn/version "2025.09.22"}
io.github.teodorlu/play.teod.eu {:local/root ".."}}}
$ clj-kondo --lint kondo_hooks_for_application_programmers.clj
WARNING: file kondo_hooks_for_application_programmers not found while loading hook
WARNING: error while trying to read hook for kondo-hooks-for-application-programmers/defgrinning: Could not find namespace: kondo-hooks-for-application-programmers.
[...]
linting took 18ms, errors: 2, warnings: 2I missed this part from https://github.com/clj-kondo/clj-kondo/blob/master/doc/hooks.md:
> This code will be placed in a file hooks/with_bound.clj in your .clj-kondo directory.
Back to work! 😄
got it working! 😁
$ clj-kondo --lint kondo_hooks_for_application_programmers.clj | grep "Radioactivity disallowed"
kondo_hooks_for_application_programmers.clj:151:1: error: Radioactivity disallowed, it does not cause grinning!
reading the docs helps, spelling my question out helps.