This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2020-08-10
Channels
- # announcements (1)
- # apache-kafka (1)
- # beginners (61)
- # bigdata (1)
- # brompton (3)
- # buddy (1)
- # calva (18)
- # clara (2)
- # clj-commons (1)
- # clj-kondo (21)
- # cljs-dev (2)
- # clojure (32)
- # clojure-europe (10)
- # clojure-filipino (4)
- # clojure-france (2)
- # clojure-italy (5)
- # clojure-nl (4)
- # clojure-spec (28)
- # clojure-uk (14)
- # clojurescript (6)
- # conjure (1)
- # cursive (5)
- # data-science (1)
- # datahike (2)
- # datomic (9)
- # emacs (4)
- # esprit (17)
- # fulcro (14)
- # jobs (1)
- # jobs-discuss (18)
- # lsp (1)
- # malli (27)
- # msfs2020 (22)
- # off-topic (7)
- # pathom (3)
- # portal (1)
- # re-frame (23)
- # reagent (4)
- # reitit (1)
- # remote-jobs (1)
- # shadow-cljs (5)
- # sql (11)
- # tools-deps (77)
- # vim (19)
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 😕
@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?+)
You can also attach this on the test namespace's metadata so it will only exclude it there
maybe even better:
{:linters {:unresolved-symbol {:exclude [(clojure.test/is [thrown?+])]}}}
(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]))
(t/is (thrown+? #(= % expected-err)
(sut/fetch user-service
(:customer-id expected-user)
(:user-id expected-user)
(:zd-token expected-user))))
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