Scapegoat – static code analysis for Scala

Scapegoat is a static code analyser for Scala that works as a compiler plugin.

Rather than concentrating solely on formatting or conventional style rules, it examines compiled Scala source for patterns that may indicate bugs, unsafe behaviour, confusing constructs or non-idiomatic code. This allows it to complement style-oriented tools while giving developers a broad collection of inspections that can be incorporated directly into existing builds. Its analysis can be tuned to the needs of an individual codebase, including projects where only selected inspections should be enforced.

This is free and open source software.

Key Features

  • Provides a large collection of inspections covering correctness, maintainability, suspicious constructs and programming practices.
  • Detects issues such as unsafe casts, problematic exception handling, questionable comparisons and misuse of collections.
  • Identifies code patterns that can produce surprising results, including floating-point comparisons and unsafe collection operations.
  • Supports different inspection levels so findings can be classified according to their importance.
  • Lets users enable only specified inspections or disable checks that are inappropriate for a particular project.
  • Supports custom inspectors, allowing teams to extend analysis with project-specific checks.
  • Can exclude source files using configurable regular-expression patterns.
  • Generates reports in multiple formats including HTML, XML, Markdown, Scalastyle and GitLab code-quality output.
  • Can print findings directly to the console for straightforward use in local builds and automated workflows.
  • Allows warning levels to be overridden individually rather than accepting the supplied defaults.
  • Integrates with sbt and can also be incorporated into Maven and Gradle-based Scala builds.
  • Provides mechanisms for suppressing individual findings where a particular occurrence is intentional.

Website: github.com/scapegoat-scala/scapegoat
Support:
Developer: Stephen Samuel and contributors
License: Apache License 2.0

Scapegoat is written in Scala. Learn Scala with our recommended free books and free tutorials.


Related Software

Scala Linters
ScalafixRefactoring and static analysis tool for improving code quality
ScapegoatStatic analysis tool that detects bugs and questionable code
WartRemoverFlexible tool for enforcing safer coding practices

Read our verdict in the software roundup.


Best Free and Open Source Software Explore our carefully curated directory of recommended free and open source software, covering every major software category.

The directory forms part of our extensive collection of articles for Linux enthusiasts. It includes hundreds of detailed reviews, together with free and open source alternatives to proprietary software from companies such as Google, Microsoft, Apple, Adobe, IBM, Cisco, Oracle, and Autodesk.

LinuxLinks also covers interesting projects worth exploring, Linux-compatible hardware, free programming books and tutorials, and much more.

Know a useful free and open source Linux application that we haven’t covered? Tell us about it using our submission form.
Subscribe

Please read our Comment Policy before commenting.

Notify of
guest
0 Comments
Oldest
Newest Most Voted