clj-kondo

2026-04-10T16:34:12.914149Z

here's a weird one for you. Metabase has a metabase.util.malli/defn wrapper that wraps Malli schema validation around a function. that part works fine, but I'm augmenting it to allow adding the (rarely used) pre-post condition map with new :test/pre and :test/post keys to add conditions that are guaranteed to be elided in prod builds. of course there's handling in Kondo for {:post [(some? %)]} referring to the return value, but that doesn't work on :test/post. to date we've gotten away with :lint-as {metabase.util.malli/defn schema.core/defn}. is there some trick to make :test/post get treated like :post, or should I suck it up and write a proper hook for this defn wrapper?

borkdude 2026-04-10T17:50:31.315049Z

you could do an additional rule with :config-in-call for your function to suppress the warnings you don't like