Fork me on GitHub
#clj-kondo
<
2019-07-21
>
euccastro21:07:15

clj-kondo gives me unresolved symbol warnings for symbols I'm trying to define with compojure.core/defroutes. how do I teach clj-kondo that defroutes is actually defining a var, so it knows not to warn either at the point of definition nor in subsequent usages of the var? same with rum.core/defc and many others

borkdude21:07:32

That would be something like {:lint-as {compojure.core/defroutes clojure.core/def}}

euccastro21:07:51

thanks @borkdude! alas, I tried just that and it didn't seem to work. I'm using spacemacs; maybe that sets some config in --config that overrides my ~/.clj-kondo/config.edn?

borkdude21:07:04

@euccastro clj-kondo picks the first .clj-kondo directory up from your working directory, so maybe there is another one in the way?

borkdude21:07:19

if you can post a small snippet of your code, I could test it

borkdude21:07:46

--config doesn't get in the way of .clj-kondo/config.edn, those are merged

euccastro21:07:49

thanks! yes, I had a project-specific .clj-kondo that was being picked up instead. copying the config.edn there worked!

euccastro21:07:07

so I guess my mistake was trying to set this globally in a $(HOME)/.clj-kondo

borkdude21:07:16

it's best to have a project-specific clj-kondo directory I think, this way you can avoid namespace conflicts, as this directory is also used to populate a cache

euccastro21:07:52

I agree, I just misread the setup instructions