Clojure 代码静态分析工具

9
有没有工具可以在Clojure中运行代码约定测试?例如,确保函数名称不含任何大写字母或关键字不含任何下划线。

是的,它被称为grep(/ ack / the silver searcher);-) - om-nom-nom
1
如果你开发Web应用程序,我还想建议你看看这两个Leiningen插件:https://github.com/vbauer/lein-jshint和https://github.com/vbauer/lein-jslint 它们允许你使用相应的工具检查你的JS文件。 - Vladislav Bauer
2个回答

10

1
这个看起来也很有前途,虽然我还没有尝试过:https://github.com/jonase/eastwood - noahlz

6
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非常适合查找库和应用程序中未使用的代码路径。


网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接