Hi, everyone, Is there some lib or rewrite-clj script that performs some basic fixes like remove unused namespaces or remove unused binding reported by clj-kondo?
Perhaps there are also girls here :) I think #lsp can possibly help you with that. Unused namespaces for sure.
Sorry! 😅 Going to use a more gender neutral term next time!
In the future https://github.com/borkdude/carve may also try to do this, but it doesn't currently
No worries, I just want to make sure that there can also be girls here :)
Cool! Thanks for the info, going to take a lot in it.
You're are totally right!
I've just started using clj-kondo and I'm trying to figure out how to configure it in our monorepo
is there a way for clj-kondo to tell me what config file it is detecting?
@lilactown clj-kondo walks up to the first .clj-kondo
dir it encounters
personally I create a .clj-kondo
for each project in a mono-repo
why is that?
we have a lot of projects 😬
smaller configs have better startup time :)
also we have some projects with overlapping namespaces
if that isn't a problem, you can choose to have only one .clj-kondo
dir, but this also makes linting your classpaths a bit more complicated I think
yeah that's what i'm thinking through rn
you could script it using babashka or so
you can also put common config into one directory and then refer to it using :config-paths
first step is I want editor integrations to work well, since a lot of our jr devs are using VS Code + Calva and running into lots of squigglies due to our custom macros
perhaps that's the best; create common configurations for e.g. services, ui, libraries in the top-level and then each project can refer to the appropriate one
I suppose for step 2, linting in CI, I would want to run clj-kondo in each sub project, or script it with babashka like you were saying?
yeah, you can do that, just iterate through the projects.
I ended up creating a shared config in our app root:
.clj-kondo/ui/config.edn
and added configs to our ui projects that refer to it via :config-paths
. it's working well, and gives us room to add service and api configs later.
thanks for the guidance! 😄