Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Are there any tools for performing static analysis of Scala code? [closed]

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.

like image 278
Roman Kagan Avatar asked Oct 21 '09 05:10

Roman Kagan


People also ask

Which tool can be used to perform static code analysis?

SonarQube. SonarQube is the popular static analysis tool for continuously inspecting the code quality and security of your codebases and guiding development teams during code reviews. SonarQube is used for automated code review with CI/CD Integration.

Which tool is best suited for use by developers and provides static analysis on their code?

Klocwork. Klocwork can perform static code analysis on projects of almost any size. The primary benefit of using Klocwork is that it is easily integrable with Visual Studio Code IDE, Eclipse, IntelliJ, and a few others. This makes use of Klocwork easier for developers.

Can static analysis of code be automated?

Static analysis is used in software engineering by software development and quality assurance teams. Automated tools can assist programmers and developers in carrying out static analysis. The software will scan all code in a project to check for vulnerabilities while validating the code.

Which activity is performed using static analysis tools?

Static code analysis (or static analysis) is a software testing activity in software development, in which the source code is analyzed for constructs known to be associated with software errors or security vulnerabilities.


2 Answers

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.

like image 81
Chris Peterson Avatar answered Sep 29 '22 14:09

Chris Peterson


There is now Scalastyle which does the job that Checkstyle does for Java. This includes not only formatting checks, but also some checks for known sources of bugs, such as a class which implements hashCode() but not equals.

There are currently about 40 checks, but we're adding them all of the time.

For more information, see www.scalastyle.org.

like image 31
Matthew Farwell Avatar answered Sep 29 '22 15:09

Matthew Farwell