Fork me on GitHub

I'm setting up a project's clj-kondo config which uses an library that has an exported clj-kondo config. The manual recommends that I use clj-kondo with --copy-configs etc. and then refer to these copied configs via the :config-paths setting in the project's config.edn. This all works fine but I'm a worried that the libraries exported config will change and so my copy will unwittingly get stale. Do I just have to live with this risk, hoping that any change in the library will result in my stale copied config results in a linting fail, or is there some mechanism I could use to keep my copied config in sync with the library's exported version?


@grahamcarlyle you don't have to set :config-paths anymore, I should probably remove that. as long as there is a two-level directory like .clj-kondo/foo/bar/config.edn in there, it will be picked up automatically. To keep up to date:

clj-kondo --lint $(clojure -Spath) --copy-configs --dependencies --skip-lint


and then check into source control whatever is copied to .clj-kondo/... except the .cache directory


@borkdude thanks I will remove my :config-paths setting. So I have to manually keep the copied config up to date, its a shame that this can't be done automatically by clj-kondo (via some integration with deps or whatever)


I expect the config churn to not be so great and with --skip-lint this should happen sub-second


you could hook it to some git commit hook or bb task

👍 1