Fork me on GitHub
Ben Sless11:10:34

I'm trying the instrument example from the documentation, while I get the report in the REPL, kondo isn't emitting the lint warnings for it. Am I missing anything?


@ben.sless Have you added the emitted config to your clj-kondo config?

Ben Sless11:10:51

Looks like I am missing something. The emitted config is written by malli by default to .clj-kondo/configs/malli/config.edn, do I need to include it somehow?


yeah, in .clj-kondo/config.edn you need to write {:config-paths ["configs/malli"]}

πŸ‘ 1
Ben Sless11:10:20

Thank you πŸ™‚

πŸŽ‰ 1

Thanks, this solved it for me as well πŸ™ A question on clj-kondo/malli integration: when a function takes a map as parameter, clj-kondo is highlighting if the passed parameter is not a map, but it does not highlight if the value under a certain key is not correct type. Is this expected, and a hard limitation of clj-kondo/malli, or something that just has not been done (because it will require a lot of work, etc.). I just want to know where to set my expection. 😁


Hey, I ran into the following when converting a schema to PlantUML.

(def value
   {:description "Non negative numeric value."
    :json-schema/example 780.56}
   [:>= 0]])

(def simple-registry
   {:value value}))

(def schema-merged
      [:name string?]
      [:age value]]
      [:address string?]]]
    {:registry simple-registry})))

  (plantuml/transform schema-merged))
Now, trying to render PlantUML results in :malli.core/invalid-schema {:schema :merge}. Does plantuml/transform support stuff outside malli.core? The schema-merged above expands into following schema:
[:merge [:map {:closed true} [:name string?] [:age [:and {:description "Non negative numeric value.", :json-schema/example 780.56} number? [:>= 0]]]] [:map {:closed true} [:address string?]]]


Not sure why the plantuml transform doesn't do this but if you deref the schema, it works:

(plantuml/transform (m/deref schema-merged))


Thanks! Missed that completely πŸ™ˆ

Ivan Fedorov21:10:51

What’s the replacement for a set as a predicate in malli? Analogue of (s/def :spec1 #{:a :b}) Is it [:or [:= :a] [:= :b]] ?


[:enum :a :b] :thumbsup: