What's the best way to teach clj-kondo
about slingshot's special "features"?
E.g. I have this catch clause inside try+
and the linter reports "unresolved symbol" for both status, body, and &throw-context.
@jumar We have a hook for this in clj-kondo/config: https://github.com/clj-kondo/config
Thanks, I'll have to figure out how to include it in my setup 🙂.
This is explained in its README
For the new unresolved-var
linter is there a way to exclude namespaces using a wildcard? Whttp://e.ge have yesql bringing in our sql functions using defqueries
that are all in namespaces like <http://com.us|com.us>.queries.yesql.account
and I don’t want warnings for any unresolved vars coming from <http://com.us|com.us>.queries.yesql.*
namespaces.
Essentially, this is what we’re doing now: https://github.com/clj-kondo/config/tree/master/hugsql but that no longer works
afaict
@michaeljameserwin This should still work if you haven't defined any other vars in those namespaces
If the namespace is empty (as far as clj-kondo is concerned), then it will be ignored with respect to the unresolved-var linter
Ok, I will play around with it and see. Right now it seems the same as the hugsql example I posted, but will verify.
There should be no file associated with that namespace in the .clj-kondo .cache in this case
ya still erring. My yesql ns is like:
(ns com.core.db.query.yesql.webhook
(:require [yesql.core :as yesql]))
(yesql/defqueries "sql/core/webhook.sql")
And still getting
warning: Unresolved var: yesql.webhook/find-webhook-by-id
At the moment there is no wildcard, but you can turn the unresolved-var linter off for now and post an issue
Ok thanks, will try to get a min case and post an issue later today or tomorrow. Many thanks @borkdude
:thumbsup:
Btw, you might be able to disable linting for these namespace completely using the :output
config
this is based on filename where you can use regex
Ok cool will look into that as a workaround