clj-kondo / configs

Library configurations as dependencies for clj-kondo
MIT License
12 stars 3 forks source link

Claypoole hooks report unused bindings #2

Closed Limess closed 1 year ago

Limess commented 3 years ago

When using the Claypoole config from this library, anything within pool-and-body is reported as an unused binding

e.g.

(let [queue-url "some-url"
      resulting-binding (cp/future :builtin (some-function queue-url))])

reports queue-url as unused via the unused-binding rule.

Kynde commented 2 years ago

Same here, I get a report for unused binding a.

(let [a [1]]
  (com.climate.claypoole/pmap 1 #(println %) a)))
devurandom commented 1 year ago

https://github.com/devurandom/clj-kondo-configs-issue-2 contains a minimal reproduction of this issue:

❯ clj-kondo --version
clj-kondo v2022.12.10
❯ clj-kondo --lint src/clj_kondo_example.clj
src/clj_kondo_example.clj:2:14: warning: namespace clojure.edn is required but never used
src/clj_kondo_example.clj:5:21: warning: unused binding thread-pool
linting took 23ms, errors: 0, warnings: 2
borkdude commented 1 year ago

Fixed with io.github.clj-kondo/config-org.clj-commons-claypoole {:mvn/version "1.0.1"}