Are there any tools for performing static analysis

2020-05-14 01:56发布

Are there any tools for performing static analysis of Scala code, similar to FindBugs and PMD for Java or Splint for C/C++? I know that FindBugs works on the bytecode produced by compiling Java, so I'm curious as to how it would work on Scala.

Google searches (as of 27 October 2009) reveal very little.

Google searches (as of 01 February 2010) reveal this question.

9条回答
你好瞎i
2楼-- · 2020-05-14 02:22

There is some work going on in that direction. Some links:

There is also a discussion on scala mail list, archive available here.

查看更多
唯我独甜
3楼-- · 2020-05-14 02:26

scala copy paste detector, based on AST. Looking for copy-pasted subtrees/ASTs, and inform about it.

It's plugin for sbt.

https://github.com/ajtkulov/scala-cpd

查看更多
看我几分像从前
4楼-- · 2020-05-14 02:28

FindBugs analyzes JVM byte codes, regardless of the tool that generated them. I've tried using FindBugs to check .class files generated by Scala. Unfortunately, FindBugs produced many warnings, even for trivial Scala programs.

查看更多
登录 后发表回答