yagni icon indicating copy to clipboard operation
yagni copied to clipboard

functions in spec/def not referenced?

Open kurt-o-sys opened this issue 8 years ago • 1 comments

Having a function:

(defn- somefunction "cool doc"
  [arg]
  ... do funky stuff ...)

and and a clojure spec:

(spec/def ::speckey (spec/and 
  #(contains? % :specialkey)
  #(somefunction (:specialkey %)))

Yagni gives a WARN: could not find any references to the following:.

kurt-o-sys avatar Aug 05 '16 13:08 kurt-o-sys

Yeah, support for clojure.spec will require some additional patching. These sort of namespace-localized keywords aren't currently part of Yagni's tracing algorithm.

venantius avatar Aug 06 '16 18:08 venantius