lein-bikeshed
lein-bikeshed copied to clipboard
clojure.core/key is not detected
I had code looking like this. Even though key is clojure core function it did not give error when checking arguments colliding with clojure.core functions.
I don't know if it's missing because it does not detect key (in reduce)
or it could be that lein-bikeshed does not detect the arguments in anonymous functions.
If the case is the latter, I don't know if it's a bug or intentional decision.
(defn- a-func-name [config config-keys]
(reduce
(fn [config key]
(if-let [[optional-key value] (find config (s/optional-key key))]
(-> config
(dissoc optional-key)
(assoc key value))
config))
config
config-keys))
I believe this has to do with read-namespace not returning lambdas and other
anonymous functions.
Basically we require the namespace and then look at the
ns-interns to see what the
methods are, since ns-interns doesn't return lambdas, they're ignored for
shadowing.