clj-kondo

pfeodrippe 2024-11-22T02:25:57.118379Z

Hi o/ One qq, let's say I have a transpiler from Clojure to C and I have source mapping setup so I know more or less which clj line in a file a C expression represents. I am thinking about using clj-kondo to output the C compiler's error in my IDE. From a clj-kondo hook, maybe I could call shell, parse clang's output (or some error file) and print it in an expected clj-kondo format? Or is there a way to create errors at runtime from JVM Clojure like Malli does with types? Just trying to understand what's possible, thanks for clj-kondo, Michiel!

pfeodrippe 2024-11-22T02:30:45.764149Z

Hunnn, I guess I can use https://github.com/IGJoshua/coffi/blob/master/resources/clj-kondo.exports/org.suskalo/coffi/hooks/coffi.clj#L11, so maybe I can slurp an error file and use api/reg-finding! to warn in the right location, will try it later!

👍 1
👀 1