This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2023-06-07
Channels
- # aleph (5)
- # announcements (2)
- # babashka (17)
- # beginners (13)
- # cider (4)
- # clj-kondo (9)
- # cljdoc (18)
- # clojure (20)
- # clojure-art (7)
- # clojure-dev (11)
- # clojure-europe (20)
- # clojure-nl (2)
- # clojure-norway (53)
- # clojure-spec (30)
- # clojure-uk (4)
- # clojurescript (40)
- # datomic (70)
- # events (2)
- # graalvm-mobile (8)
- # gratitude (2)
- # guix (2)
- # honeysql (3)
- # hyperfiddle (10)
- # introduce-yourself (4)
- # jobs (2)
- # lsp (6)
- # luminus (3)
- # malli (5)
- # polylith (35)
- # practicalli (6)
- # re-frame (3)
- # reagent (9)
- # releases (1)
- # remote-jobs (20)
- # ring-swagger (2)
- # shadow-cljs (12)
- # sql (18)
- # xtdb (7)
Hello folks! What's the best way to keep a unit test suite of clj-kondo hooks? I'm writing a few hooks and I'd like to unit test them. Are you following some approach to achieve that?
i use clj-kondo in my CI and rely on failure to inform when my hooks might be incorrect lol
@U04CAPVN1HS You could use clj-kondo as a JVM library and just test for :findings that it should report when you run!
over some example code?
Nice @UEENNMX0T! So you call clj-kondo in a shell script iterating over several test scenario input files and expected all them to exit code 0?
@U04V15CAJ hmmm to use clj-kondo as a JVM library... very interesting!
I don't do anything extra, I just write what looks like a valid hook and then try it out a bunch and then rely on normal clj-kondo --parallel --lint dev src test
to tell me when i've made a mistake (either in code or in the hook).
oh, got it 😉