Fork me on GitHub
#clj-kondo
<
2021-11-04
>
kommen08:11:18

is feasible to get and an “unused binding” warning for x here?

(defprotocol Foo
  (y [_ bar baz]))

(defn f []
  (reify Foo
    (y [_ x z]
      (println z))))

(y (f) "a" "b")

borkdude09:11:28

I'll make a similar issue for defprotocol and reify

Noah Bogart17:11:26

I’m using the mongodb library monger, and it defines a bunch of mongo-specific query operators, such as $or. These are in the namespace monger.operators , all defined with a macro: https://github.com/michaelklishin/monger/blob/master/src/clojure/monger/operators.clj

Noah Bogart17:11:59

because of this, usage of the operators in my code give unresolve-var errors: [monger.operators :refer [$or]]

Noah Bogart17:11:10

any ideas for a solution here?

borkdude17:11:41

@nbtheduke {:lint-as {monger.operators clojure.core/def}} and then re-lint your dependency

borkdude17:11:52

optimally that config should be exported as part of the library itself

Noah Bogart17:11:56

oh wow, that’s easy