how can I exclude the symbol thrown+?
from being linted globally?
its added by slingshot as an extension of a multimethod, so there is no namespace attached to it
:unresolved-symbol {:exclude [(thrown?+)]}
is not working 😕
That's only within clojure.test, it's not global
@plins The way you're using that config is that it will ignore unresolved symbols inside calls to thrown?+. If you want to ignore the unresolved symbol itself you simply write thrown?+
instead of (thrown?+)
Full config: {:linters {:unresolved-symbol {:exclude [thrown?+]}}}
You can also attach this on the test namespace's metadata so it will only exclude it there
it was supposed to be nested inside linters, thank you very much 😄
maybe even better:
{:linters {:unresolved-symbol {:exclude [(clojure.test/is [thrown?+])]}}}
so then it will only ignore it within clojure.test/is
^ @plins
am I missing something?
can you show the ns form of your test file?
(ns zendesk-app.unit.domain.user-test
(:require [clojure.test :as t]
[integrant.core :as ig]
slingshot.test
[zendesk-app.boundaries.frontend.protocol :as fe]
[zendesk-app.boundaries.oauth.protocol :as oauth]
zendesk-app.domain.user.impl
[zendesk-app.domain.user.protocol :as sut]
[zendesk-app.helper :as h]))
and your usage of the symbol?
(t/is (thrown+? #(= % expected-err)
(sut/fetch user-service
(:customer-id expected-user)
(:user-id expected-user)
(:zd-token expected-user))))
thrown+? vs thrown?+
+? and ?+
right
oh sorry for that >.<
I know hooks are the way, but Im wondering if there is already some example somewhere on to configure slingshot macros (`try+` and its special catch
)
As a matter of fact, there is: https://github.com/borkdude/clj-kondo/tree/master/examples/slingshot