Fork me on GitHub
#clj-kondo
<
2024-05-23
>
nonrecursive14:05:00

hi friends, i've a multi-project repo and want to share hooks across all the projects. so eg i want to add a hook to multi-project-root/.clj-kondo/hooks and configure a project under eg multi-project-root/project-a use the hook. how do I do this?

borkdude15:05:34

hello friend! you can do so by adding to each project's .clj-kondo/config.edn:

:config-paths ["../../.clj-kondo"]

borkdude15:05:04

(a config path is always relative to the config.edn it is used in, hence two up)

nonrecursive17:05:28

they are set up that way already, and while other parts of the common config.edn file are being respected, the hook part isn't. Though actually there is a slight deviation, and maybe that's the problem: the common config.edn is under multi-project-root/.clj-kondo/common/config.edn , so perhaps i need to move that to multi-project-root/.clj-kondo/config.edn and update the rest of the config.edn's as you suggest

nonrecursive17:05:36

oh wait the issue was i'd put the :hooks key in the wrong place

👍 1