Fork me on GitHub
#malli
<
2021-07-17
>
mike_ananev05:07:01

@ikitommi , hi! I've tried to run static type checking using FileWatchers + clj-kondo. Can't see any effect for plus1. clj-kondo works well. malli version 0.6.0-snapshot

ikitommi09:07:02

did you add the clj-kondo configs for malli? Not sure if that could be automatic in the future? Maybe @U04V15CAJ knows? https://github.com/metosin/malli#clj-kondo

ikitommi09:07:18

e.g.

✗ cat .clj-kondo/config.edn
{:config-paths ["configs/malli"]}

borkdude09:07:45

configs are never opted into automatically

borkdude09:07:02

by design, you should opt into those manually, for safety and consistency reasons

ikitommi10:07:47

Sounds right. But is there a default directory I could write the config file to, without breaking anything?

borkdude10:07:29

it's best to write into a directory with a fully qualified name like com.metosin.malli or so

borkdude10:07:36

to avoid conflicts

borkdude10:07:50

or just the domain name of your library

ikitommi10:07:12

good idea. but despite being fully qualified, users need to enable that config in their projects, right? no option to "trust 'em all"?

borkdude10:07:40

> by design, you should opt into those manually, for safety and consistency reasons

borkdude10:07:14

you should just add that dir to your config paths, that's it

borkdude10:07:34

any tool can dump any config into the dir, but it's not always something a user wants to opt into

mike_ananev10:07:22

@ikitommi you was right! I added {:config-paths ["configs/malli"]} to .clj-kondo/config.edn and now clj-kondo works well with malli static type checking

🥳 3
borkdude10:07:23

yesterday I had such a report where clojure-lsp dumped a config into the dir, but a user did not want to have this config