clj-kondo 2026-09-30

I'm wondering if it makes sense to have 2 clj-kondo stages in a build: 1. for your prod configuration only, where you don't include anything from test/dev aliases 2. for the full configuration where your test code is also linted Running 1 isolated from 2 could surface something like a production namespace referencing a test helper for example, or depending on some library that only the test alias pulls in. If I wanted to do this properly, would I need to maintain 2 separate sets of cache/imports/other autogenerated content?

👀 1

yeah, you need two invocations

Thanks! How about separate caches/imports?

you can do that with --config-dir and --cache-dir

Thank you, I'm aware of that. My question is more about: will I get false results if I init my clj-kondo with the +test classpath, then lint prod files only?

The logic is: clj-kondo remembers the last namespace it's seen in the cache. If you lint the same-named namespace later, it's a complete overwrite in the cache.

don't know if that answers your question, but I think the answer is: it should behave like you'd expect it to

Thank you, that should be enough to start!