This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2019-09-18
Channels
- # announcements (26)
- # beginners (107)
- # calva (26)
- # cider (55)
- # clj-kondo (7)
- # clojure (115)
- # clojure-europe (6)
- # clojure-houston (3)
- # clojure-italy (4)
- # clojure-nl (16)
- # clojure-norway (1)
- # clojure-uk (42)
- # clojuredesign-podcast (3)
- # clojurescript (47)
- # clojutre (4)
- # cursive (7)
- # datomic (75)
- # fulcro (1)
- # graalvm (3)
- # graphql (16)
- # jobs (1)
- # jobs-discuss (13)
- # keechma (1)
- # leiningen (19)
- # luminus (5)
- # off-topic (33)
- # pathom (16)
- # re-frame (76)
- # reitit (4)
- # ring (5)
- # shadow-cljs (86)
- # spacemacs (52)
- # tools-deps (43)
- # vim (7)
- # yada (1)
just fyi, I have ditched spec and working on my own "spec" format. it's much faster and less powerful, but ok enough for this purpose. I want to allow users to provide their own function types (like C headers maybe) in the config. it would look a bit like:
'map {:arities {1 {:arg-tags [::ifn]
:ret-tag ::transducer}
:varargs {:arg-tags '[::ifn ::seqable (* ::seqable)]
:ret-tag ::seqable-out}}}
work is in progress in the ret-types branch🧠4
These are the types for assoc which will allow catching an uneven amount of args:
:arg-tags '[::nilable-associative ::any ::any (* [::any ::any])]
$ echo '(assoc {} 1 2 3)' | clj-kondo --lint -
<stdin>:1:15: error: Insuffient input.
Is spec that difficult of a target to work with? We have s/fdef
s for any of our publicly facing functions and it'd be great to have something that ties into that
I bet there's more sources that can be used to derive data that clj-kondo can work with, e.g. schema.core/defn