I'm trying to implement traceability into my specs.
(With "specs" I specifically mean s/def
and s/fdef
blocks.)
Originally, I came up with the idea to use metadata for this. However, that's unfortunately not possible: the code below gives me a syntax error... (Metadata can only be applied to IMetas.
)
(require
'[clojure.spec.alpha :as s])
(s/def
^{:rule "205.3i"
:version "2020.06.01"}
::basic-land-type #{::forest ::island ::mountain ::plains ::swamp})
The only other way I can think of is to somehow attach the metadata as a "guardian" element within the file (let's say, a def
)
However, it seems quite ugly...
(def
^{:rule "205.3i"
:version "2020.06.01"}
tracing-info "(see metadata)")
Would anyone know some way I could use to achieve this?