This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-16
Channels
- # adventofcode (43)
- # announcements (31)
- # aws (2)
- # babashka (58)
- # babashka-sci-dev (4)
- # beginners (107)
- # calva (11)
- # cider (25)
- # clj-commons (8)
- # clj-kondo (24)
- # clojure (35)
- # clojure-argentina (1)
- # clojure-europe (25)
- # clojure-italy (5)
- # clojure-nl (11)
- # clojure-norway (39)
- # clojure-spec (11)
- # clojure-uk (3)
- # conjure (2)
- # core-async (19)
- # cursive (33)
- # data-science (2)
- # datomic (50)
- # deps-new (1)
- # emacs (3)
- # events (4)
- # figwheel-main (10)
- # fulcro (63)
- # graalvm (7)
- # holy-lambda (17)
- # introduce-yourself (1)
- # java (15)
- # jobs (1)
- # jobs-discuss (7)
- # malli (24)
- # meander (16)
- # nextjournal (19)
- # off-topic (2)
- # polylith (4)
- # portal (10)
- # re-frame (3)
- # reagent (19)
- # reitit (14)
- # releases (2)
- # remote-jobs (1)
- # reveal (19)
- # shadow-cljs (1)
- # sql (21)
- # testing (4)
- # xtdb (22)
@ikitommi The newest clj-kondo (just released) supports automatically loading configs from .clj-kondo/*/*/config.edn
- just saying :)
@U04V15CAJ so, this looks right? https://github.com/metosin/malli/pull/598
file-writing looks like:
#?(:clj
(defn save! [config]
(let [cfg-file (io/file ".clj-kondo" "configs" "malli" "config.edn")]
(io/make-parents cfg-file)
(spit cfg-file config)
config)))
but this is usually for configs about malli and not provided by malli about other things
so maybe this would be better and would still give room for malli itself to export config for its own macros too:
<metosin>/<malli-type-anns>/config.edn
➜ malli git:(clj-kondo-config-fix) ./bin/kaocha --focus malli.clj-kondo-test
[(.....)]
1 tests, 5 assertions, 0 failures.
➜ malli git:(clj-kondo-config-fix) cat .clj-kondo/configs/metosin/malli/config.edn
{:linters {:unresolved-symbol {:exclude [(malli.core/=>)]}, :type-mismatch {:namespaces {malli.clj-kondo-test {kikka {:arities {1 {:args [:int], :ret :int}, :varargs {:args [:int :int {:op :rest, :spec :int}], :ret :int, :min-arity 2}}}, siren {:arities {2 {:args [:ifn :coll], :ret :map}}}}}}}}%
➜ malli git:(clj-kondo-config-fix) clojure -Sdeps '{:deps {clj-kondo/clj-kondo {:mvn/version "2021.12.16"}}}' -M -m clj-kondo.main --lint test/malli/clj_kondo_test.cljc
linting took 163ms, errors: 0, warnings: 0
➜ malli git:(clj-kondo-config-fix) echo '{:config-paths ["configs/metosin/malli"]}' > .clj-kondo/config.edn
➜ malli git:(clj-kondo-config-fix) clojure -Sdeps '{:deps {clj-kondo/clj-kondo {:mvn/version "2021.12.16"}}}' -M -m clj-kondo.main --lint test/malli/clj_kondo_test.cljc
test/malli/clj_kondo_test.cljc:80:9: error: Expected: integer, received: string.
linting took 200ms, errors: 1, warnings: 0