Fork me on GitHub

hi there, I'm looking for a spec definition for leiningen project files. Way too often I'm making mistakes in my project.clj and I'd like to see spec complain to me about it. In many cases I keep adding keywords to sub-maps where they don't belong (and are ignored)

Alex Miller (Clojure team)16:04:40

leiningen project files are evaluated and can contain arbitrary code, so I'm not sure you can really make a spec for it

Alex Miller (Clojure team)16:04:08

although maybe you could make a pseduo-spec that would validate in lieu of that


good point. But I'd be happy with a spec covering the keys in defproject as documented in the reference file. That should be able to catch some of the stupid mistakes I'm making. Maybe someone has gone through that exercise already. I'd be happy to see the same thing for deps.edn (although I haven't asked Google about that yet)


it can be quite costly to hunt down config problems

Alex Miller (Clojure team)16:04:14

there are specs for deps.edn in tools.deps.alpha


excellent thank you

Alex Miller (Clojure team)16:04:01

they are not currently actively used during validation as we were trying to support older clojure versions, but eventually will get addeed

Alex Miller (Clojure team)16:04:50

there's some scratch code in a comment block at the end that you can use to validate deps.edn files with it

Alex Miller (Clojure team)17:04:14

that is, all deps.edn recursively under a dir


thank you very much!