This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-03-11
Channels
- # aleph (50)
- # announcements (20)
- # babashka (68)
- # beginners (70)
- # calva (25)
- # cider (1)
- # clj-kondo (10)
- # cljs-dev (3)
- # clojars (1)
- # clojure (113)
- # clojure-australia (7)
- # clojure-berlin (4)
- # clojure-europe (47)
- # clojure-italy (14)
- # clojure-nl (2)
- # clojure-norway (1)
- # clojure-serbia (5)
- # clojure-spec (11)
- # clojure-uk (8)
- # clojurescript (16)
- # community-development (2)
- # conjure (2)
- # cursive (15)
- # data-oriented-programming (35)
- # datahike (12)
- # datascript (5)
- # datomic (13)
- # duct (7)
- # fulcro (21)
- # graalvm (94)
- # graphql (1)
- # helix (4)
- # honeysql (19)
- # jackdaw (8)
- # jobs (2)
- # jobs-rus (1)
- # leiningen (1)
- # malli (32)
- # missionary (1)
- # mount (1)
- # off-topic (40)
- # perun (2)
- # portal (7)
- # reitit (10)
- # rewrite-clj (26)
- # shadow-cljs (90)
- # spacemacs (29)
- # sql (17)
- # tools-deps (49)
- # wasm (1)
- # xtdb (26)
@borkdude I just want to say that clj-kondo is amazing. Thank you very much for bringing it up to Clojure 🙂 I've just configured static typing with #malli & #clj-kondo in Clojurescript for one of the apps based on Rum. Looks awesome! Looking forward to more features in that area!
@borkdude One question though 😄 I have the following definition
{:lint-as {malli.schema/defn schema.core/defn},
:linters {:type-mismatch
{:namespaces
{view.home-page {usp-banner*
{:arities {1 {:args [{:op :keys, :req {:user-id :number}}],
:ret :any}}},
usp-banner
{:arities {1 {:args [{:op :keys, :req {:user-id :string}}],
:ret :any}}}}}}}}
and invocation:
(defn usp-banner*
[props]
nil)
(defn usp-banner
[props]
(usp-banner {:user-id (:user-id props)})
(usp-banner {:user-id "SomeUserIdAsString")
As for now clj-kondo does no report the type incompatibility. Is there a plan to support it in a future? 🙂No plans in the immediate future. This is quite hard to do with static analysis without building something like TypeScript
Actually this would be quite powerful. Typescript for Clojurescript via clj-kondo. There is a huge potential in it 😄
You may post an issue for this specific example so I can see what can be done realistically
Sure! Thank you very much!
I'm wondering if (next coll)
over (seq (rest coll))
could be a good suggestion candidate for clj-kondo ...
I can't say I've ever seen the latter in code... is that something folks actually do?
(I just searched all the OSS projects I have locally and our 110K line codebase at work)