This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-02
Channels
- # adventofcode (6)
- # announcements (6)
- # babashka (21)
- # babashka-sci-dev (18)
- # biff (6)
- # clara (4)
- # clj-commons (2)
- # clj-kondo (7)
- # cljdoc (4)
- # clojure (9)
- # clojure-berlin (8)
- # clojure-europe (23)
- # clojure-gamedev (3)
- # clojure-indonesia (1)
- # clojure-nl (1)
- # clojure-norway (10)
- # clojure-poland (1)
- # clojurescript (27)
- # community-development (1)
- # conjure (32)
- # etaoin (6)
- # events (20)
- # fulcro (5)
- # graalvm (1)
- # helix (19)
- # hyperfiddle (14)
- # introduce-yourself (2)
- # music (1)
- # nbb (24)
- # off-topic (37)
- # pathom (2)
- # polylith (14)
- # reagent (11)
- # releases (1)
- # remote-jobs (1)
- # reveal (22)
- # shadow-cljs (16)
- # sql (3)
- # squint (11)
- # test-check (2)
- # xtdb (36)
how would you get clj-kondo to lint a new assertion (is (not-thrown?...)
with the same linter for (is (thrown?...)
within the context of clojure.test, I mean
this is currently not configurable. you could just suppress this symbol with :unresolved-symbol :exclude
alright, thank you!
The way I do this (also seen in https://github.com/clojure-expectations/clojure-test/blob/031f55fe494d3cbf1e77039a41b2b2a60048a11a/src/expectations/clojure/test.cljc#L46) is to write a macro that throws for each new assertion and then refer them. Then, the assert-expr
method will expand before the referred var can expand
This lets you put doc strings on the vars too, which is nice
ahhhh that's tricky but workable. I think I'll just suppress the symbol for this tiny usage, though. thanks, Noah!