Late to the party here. Seconding
noahlz, the three main static analysis tools that I use on a regular basis are
lein-bikeshed,
lein-kibit, and
Eastwood, though I also use
yagni. Each of these has different strengths.
Bikeshed is good for general code cleanup but is mostly focused on style (e.g. making sure lines aren't too long, there's no trailing whitespace, functions have docstrings, etc.).
Kibit is good for showing you the most idiomatic function to use (for instance, when using an
if
form that returns nil if false, you could just use
when
instead).
Eastwood是Clojure中最全面的代码检查工具,可以检查出很多代码质量问题。
最后,Yagni非常适合查找库和应用程序中未使用的代码路径。