plumatic / plumbing

Prismatic's Clojure(Script) utility belt

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Incorrect use of schema for function explicit-schema-key-map ?

jafingerhut opened this issue · comments

I am not familiar with the use of Schema yet, but while testing Eastwood on plumbing code it flagged the symbols :- s/Keyword and s/Bool as 'unused' in the function definition below, while it gave no such warnings for many other similar function definitions, so this one may be incorrect:

File: src/plumbing/fnk/schema.cljx

(sm/defn explicit-schema-key-map
"Given a possibly-unevaluated map schema, return a map from bare keyword to true
(for required) or false (for optional)"
[s] :- {s/Keyword s/Bool}
(->> s
keys
(keep unwrap-schema-form-key)
(into {})))

Thanks for the heads up -- the schema is in the wrong place.