borkdude/carve

False positive with `:implements`

AndreaCrotti opened this issue · 3 comments

This might be hard to implement, but I noticed that if you have a namespace like this

  (:import (org.apache.kafka.streams.processor TimestampExtractor))
  (:gen-class
   :implements [org.apache.kafka.streams.processor.TimestampExtractor]))

(defn -extract [_ record previous]
  (do-something))

-extract would be deleted, even if it's actually used, and its definition has the side effect of implementing that interface.

I guess we could ignore all the vars starting with - maybe, assuming that's a well known convention for things that can have side effects on definition.

That would also cover -main from the open PR.

This is now solved with #17
(at least -extract would be ignored now)