Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

:unused-namespaces false positive when implementing a protocol #162

Closed
dpassen opened this issue May 24, 2015 · 4 comments · Fixed by #186
Closed

:unused-namespaces false positive when implementing a protocol #162

dpassen opened this issue May 24, 2015 · 4 comments · Fixed by #186
Labels

Comments

@dpassen
Copy link
Contributor

dpassen commented May 24, 2015

Simply requiring a namespace for a protocol to be implemented in a record causes a false positive when using the :unused-namespaces linter.

lein eastwood '{:linters [:unused-namespaces]}' 
== Eastwood 0.2.1 Clojure 1.6.0 JVM 1.7.0_51
Directories scanned for source files:
  src test
== Linting protocol-test.foo ==
== Linting protocol-test.bar ==
Entering directory `/Users/derek/apps/protocol-test'
src/protocol_test/bar.clj:1:1: unused-namespaces: Namespace protocol-test.foo is never used in protocol-test.bar
== Warnings: 1 (not including reflection warnings)  Exceptions thrown: 0
Subprocess failed

bar.clj

(ns protocol-test.bar
  (:require [protocol-test.foo :as foo]))

(defrecord Bar [whatever]
  foo/Foo
  (foo [this] whatever))

foo.clj

(ns protocol-test.foo)

(defprotocol Foo
  (foo [this]))
@jafingerhut
Copy link
Collaborator

Thanks for the small test case to reproduce the issue.

@bencripps
Copy link

@jafingerhut ugh i was bit by this one too, any chance of getting this merged?

@abtv
Copy link

abtv commented Aug 14, 2017

Any updates on it? @jafingerhut

@jafingerhut
Copy link
Collaborator

This should be fixed in the forthcoming Eastwood 0.2.5 release.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants