eastwood

Colin P. Hill 2024-06-21T14:35:30.364849Z

Does anyone have a clear idea of the current overlap between eastwood functionality and clj-kondo functionality? I have a codebase where eastwood is configured but currently disabled in CI. I'm going to add clj-kondo to our CI, and I'm trying to get an idea of how much additional value there would be in re-enabling eastwood. I know eastwood's strategy of dynamic analysis means it can spot things clj-kondo cannot, but I haven't found much about the specifics of when and where.

vemv 2024-06-21T14:57:08.166019Z

I run clj-kondo + eastwood in all projects from OSS projects like CIDER. to all my commercial ventures as a consultant. In CI normally clj-kondo is a touch faster (not that much if you properly have it pre-analyze your entire classpath) so I have it "fail-fast" Eastwood. Eastwood has a few linters that clj-kondo doesn't. Most practically reflection (in a fine-grained way which other reflection checkers lack) and deprecations (with Java support - not only clj-level deprecations). As you hint, even for the overlapping linters, Eastwood evals and macroexpands arbitrary code so it can reach things kondo can't - not without writing hooks. It also typically needs a fraction of the config that kondo needs for a commercial project, so in human terms it tends to be pretty low-effort. With all this said, as the last person that maintained Eastwood, I don't have a lot of time/energy to further maintain Eastwood or advocate its use. I'm just happy that it works for a vast array of projects (which wasn't the case some 4y ago) and that it gives me misc value with low effort.

👍 2
lread 2024-06-21T16:18:34.611189Z

Clj-kondo is awesome. It helps me correct my many typos in real-time and is also a great CI linter. That said, I really like the Java lib deprecations Eastwood reports. One tip is to run Eastwood under a current JDK version to find newer JDK deprecations (for example, run it under jdk21 instead of jdk8).

Colin P. Hill 2024-06-21T16:19:22.773079Z

Yeah, Java deprecations is the one thing I was seeing (it might even have been your messages that I found).

Colin P. Hill 2024-06-21T16:19:35.829919Z

Using a newer JDK is an interesting idea 🤔

Colin P. Hill 2024-06-21T16:37:53.595169Z

Haha, this makes me feel vindicated. Just the other day I added this comment to our code:

;; Don't reinvent the wheel, just let Java parse the URI.
;; It's a more complex task than you think.
(let [java-uri (URI. url)]

1