Fork me on GitHub

I just let eastwood loose on cljdoc,


Admittedly I did not need to fix reflection warnings, but they did help me find many old usages of String interop that clojure.string can now replace.


Anyhoo thanks @U45T93RA6 for all the hard work on eastwood!


🍺 🍺 ❤️

❤️ 4
🍻 4

Nice! Btw, there is also a :warn-on-reflection linter in clj-kondo: it doesn't check runtime reflection issues, but just warns that whenever you do Java interop and you haven't explicitly set this var :)


Thanks, it was an interesting exploration! Some of the findings I really appreciated from eastwood were: • when I am using deprecated Java things • all the reflection warnings (although again, one could argue I should not have addressed these for cljdoc) • warnings on suspicious code, like and and • and the was nice too.


Why is the first one suspicious? The second one can be detected by clj-kondo too: :redundant-call


The earmuff warning is something we could easily add to clj-kondo too


Ah good old :redudant-call I must not have that enabled for my kondo lint? For the first one, eastwood noticed that the when-not was based on a constant and would always evaluate to the same thing. Not necessarily something I had to address, but I appreciated the heads up. And I think I made the code clearer as a result.


There was also (the warning was something to do with a let binding, probably after macro-expand?), but in hindsight, I think I might have addressed it mostly to quiet the eastwood warning. Code, I think is fine before and after. So 🤷.