Skip to content
CAI
Software that uses CAICheck a score

scapegoat-scala/scapegoat

56.1

Adequate · 28 September 2026

6.2k

lines of production code

Scala

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Scapegoat is a static code analyzer and linter for Scala that operates as a compiler plugin for both Scala 2 and Scala 3. It detects common code quality issues and anti-patterns through a configurable set of inspections, allowing users to filter results by severity. The system generates detailed reports in multiple formats, including HTML, XML, and GitLab Code Quality, to integrate with various build and CI/CD workflows.

How it got here

2013–2014 — Scala 3 support and rebranding

6 changes.

The project was rebranded to Scapegoat and expanded to support Scala 3 alongside Scala 2, introducing a unified plugin base for consistent behavior across versions. New features included configurable inspection severity levels and a suite of report writers for formats like HTML, Markdown, and GitLab Code Quality to enhance CI/CD integration.

2017–2024 — Scala 3 support and test expansion

10 changes.

This period focused on extending Scapegoat to support Scala 3 by implementing a dedicated compiler plugin and specific inspection rules for common anti-patterns. Concurrently, the project significantly expanded its test coverage, adding comprehensive validation for both Scala 2 and Scala 3 inspection logic, report generation, and configuration handling.

Features

Added Scala 3 Scapegoat plugin configuration

Added configuration files to enable the Scapegoat static analysis plugin for Scala 3. The new plugin.properties file registers the plugin class com.sksamuel.scapegoat.ScapegoatPlugin, and scalac-plugin.xml defines the plugin metadata with the name 'scapegoat' and the corresponding class name, allowing the compiler to load and use the plugin.

src/main/resources · high confidence

Initial Scala 2 inspection engine and rule set

Scapegoat now provides a complete static analysis engine for Scala 2, introducing the core infrastructure (Inspection, Inspector, Feedback) and a comprehensive suite of code quality inspections. Users will now receive warnings for issues such as variable shadowing, use of \var\, empty case classes, redundant final modifiers, and various collection anti-patterns, enabling automated detection of common Scala pitfalls during compilation.

src/main/scala-2 · high confidence

Initial Scala 3 compiler plugin support

Scapegoat now includes a dedicated Scala 3 compiler plugin (located in src/main/scala-3) that enables static code inspections for Scala 3 projects. This implementation provides the core plugin infrastructure, including a Dotty-specific feedback reporter, an inspection traverser that respects @SuppressWarnings annotations, and a set of default inspections (EitherGet, OptionGet, AvoidRequire, AbstractTrait, and ComparingFloatingPointTypes). Users can now run Scapegoat on Scala 3 codebases with support for ignored file patterns and multiple report formats (HTML, XML, Markdown, etc.).

src/main/scala-3/com/sksamuel/scapegoat · high confidence

New GitLab Code Quality report format and configurable inspection levels

Users can now generate reports in the GitLab Code Quality format by including 'gitlab-codequality' in the reports plugin option, enabling integration with GitLab CI/CD pipelines. Additionally, the tool introduces a configurable severity system (Error, Warning, Info, Ignore) that allows users to override the default level for specific inspections via the 'overrideLevels' option and filter output using 'minimalLevel', providing finer control over which issues are reported.

repository · high confidence

New report writers for HTML, Markdown, XML, Scalastyle, and GitLab formats

The Scapegoat tool now includes a new \io\ package that provides dedicated report writers for multiple output formats. Users can generate inspection reports in HTML (with styled warnings, code snippets, and inspection names), Markdown, XML (including error/warning/info counts and full inspection class names), Scalastyle-compatible XML (with lowercase severity levels), and GitLab Code Quality format. These writers are unified under a \ReportWriter\ trait and exposed via \IOUtils\ for easy integration into the build process.

src/main/scala/com/sksamuel/scapegoat/io · high confidence

Behavioural changes

Added Scala 3 inspection implementations for require, floating-point comparison, and unsafe gets

This change introduces the Scala 3-specific implementations for several existing code inspections, enabling them to function on Scala 3 codebases. The new files provide the logic to detect the use of \require\ statements (AvoidRequire), unsafe equality checks on floating-point types (ComparingFloatingPointTypes), and the use of \.get\ on \Option\ or deprecated \Either\ projections (OptionGet, EitherGet). Additionally, it adds an inspection to flag redundant \abstract\ modifiers on traits (AbstractTrait). These implementations allow the linter to identify these specific anti-patterns when analyzing Scala 3 source code.

src/main/scala-3/com/sksamuel/scapegoat/inspections · high confidence

Project rebrand to Scapegoat with Scala 3 support and new build configuration

The project has been rebranded from 'scales-reporters' to 'Scapegoat', a Scala static code analyzer (linter). This change introduces official support for Scala 3 alongside existing Scala 2 versions, as evidenced by the new \.scalafmt.conf\ configured for \scala3\ dialect and the README listing releases for Scala 3.9.0. The build environment is updated with new configuration files: \.scalafmt.conf\ (version 3.11.5), \.scalafix.conf\, and \.scalafix-2.conf\ to enforce syntax rules and formatting. The \.gitignore\ is expanded to include Scala 3 artifacts (\.tasty\) and modern IDE/build tool directories (\.metals\, \.bsp\, \.bloop\). The README is completely rewritten to document the new brand, usage via SBT/Maven/Gradle, and a comprehensive list of 123+ inspections for Scala 2 and 5 for Scala 3.

(repo-wide) · high confidence

Unified plugin base and configurable inspection levels

Scapegoat now shares a common abstract plugin base (\ScapegoatBasePlugin\) between Scala 2 and Scala 3, enabling consistent inspection activation logic across versions. The feedback system has been refactored to support configurable warning levels, allowing users to override the default level for specific inspections or globally via the \overrideLevels\ configuration. Additionally, the tool now exposes version-specific helpers like \isScala213\ and \isScala21312OrLater\ to adapt behavior based on the running Scala version.

src/main/scala/com/sksamuel/scapegoat · high confidence

Test coverage

Added Scala 2 test infrastructure and inspection validation; Added Scala 3 test coverage for code inspections; Added Scala 3 test infrastructure and coverage; Added test coverage for Scala 2 inspections; Added test for @unused annotation support in Scala 2.13; Added tests for GitLab Code Quality and HTML report generation; Added tests for configuration, inspection levels, and README consistency.

Dependencies

Updated build dependencies and supported Scala versions

The build configuration has been updated to support Scala 2.12.20, 2.12.21, 2.13.17, 2.13.18, and 3.9.0. Key dependency versions have been bumped, including scala-xml to 2.5.0, scala-collection-compat to 2.14.0, scalatest to 3.2.20, joda-time to 2.14.4, joda-convert to 3.0.1, slf4j-api to 2.0.20, and the semanticdb-scalac compiler plugin to 4.17.4.

(dependencies) · high confidence

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 66 → 56 (-9.5)
  • Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.

Lenses

  • Code Health 96 → 96 (+0.0)
  • Architecture 100 → 83 (-17.2)
  • Maturity 57 → 57 (+0.0)
  • Readiness 73 → 46 (-27.7)
  • Security 62 → 62 (+0.0)

Resolved (2)

  • Documentation: no installation or build instructions (README.md)
  • Documentation: no usage examples (README.md)

New (1)

  • Projects may be oversized for their cohesion

Changes since last survey

  • 5 commits — 5 feature/other, 0 fixes

By area

  • (root) — 3 commits
  • project/build.properties — 1 commit
  • project/plugins.sbt — 1 commit

Notable commits

  • change: Update joda-time to 2.14.4 (#1104)
  • change: Update sbt to 2.0.9 (#1105)
  • change: Update sbt-scalafix to 0.14.9 (#1103)
  • change: Update semanticdb-scalac to 4.17.4 (#1102)
  • change: Update slf4j-api to 2.0.20 (#1106)

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by watchdog.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

Survey your own repository

scapegoat-scala/scapegoat was measured the same way every project in this corpus was: the same rubric, at a pinned commit, with the result published in full. Point a surveyor at a repository you know and see whether you agree with it.

About this page

  • The score is its most recent published measurement, taken on 28 September 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit e67bb67f3a05e666dd1080541edb4da14b02e56e — the exact code this score is about.
  • Scored under rubric-2026.09.16 — the same rubric and the same method as every other entry in this index.
  • Measured by watchdog.canine.dev using codehealth-analyzer preprod-d46da229e3fd.