Skip to content
CAI
Software that uses CAICheck a score

scapegoat-scala/scapegoat

56.5

Adequate · 14 November 2026

6.2k

lines of production code

Scala

primary language

5

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

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 cca.canine.dev from the codebase's own history, inside the signed delivery this page is composed from.

How this codebase got here

Score

  • CAI 56 → 57 (+0.2)
  • Rubric changed (rubric-2026.10.5 → rubric-2026.11.4) — scores are not directly comparable.

Lenses

  • Code Health 74 → 68 (-5.7)
  • Architecture 87 → 99 (+12.0)
  • Maturity 52 → 52 (+0.0)
  • Readiness 47 → 49 (+1.9)
  • Security 80 → 75 (-5.4)

Resolved (1)

  • Projects may be oversized for their cohesion

New (24)

  • Edited copies of one member (3 members, 15+ corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/collections/NegativeSeqPad.scala)
  • Edited copies of one member (3 members, 19+ corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/collections/AvoidSizeEqualsZero.scala)
  • Edited copies of one member (3 members, 19+ corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/collections/PreferMapEmpty.scala)
  • Edited copies of one member (3 members, 21+ corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/collections/ReverseFunc.scala)
  • Edited copies of one member (5 members, 17+ corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/collections/FilterOptionAndGet.scala)
  • Edited copy of a member (13 corresponding lines) (src/main/scala-3/com/sksamuel/scapegoat/inspections/option/EitherGet.scala)
  • Edited copy of a member (15 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/collections/ListAppend.scala)
  • Edited copy of a member (15 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/collections/PredefIterableIsMutable.scala)
  • Edited copy of a member (15 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/math/UseExpM1.scala)
  • Edited copy of a member (15 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/style/ParameterlessMethodReturnsUnit.scala)
  • Edited copy of a member (16 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/AvoidRequire.scala)
  • Edited copy of a member (16 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/FinalModifierOnCaseClass.scala)
  • Edited copy of a member (16 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/collections/CollectionIndexOnNonIndexedSeq.scala)
  • Edited copy of a member (16 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/math/ModOne.scala)
  • Edited copy of a member (16 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/option/OptionSize.scala)
  • Edited copy of a member (17 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/DoubleNegation.scala)
  • Edited copy of a member (17 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/naming/ClassNames.scala)
  • Edited copy of a member (17 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/string/ArraysInFormat.scala)
  • Edited copy of a member (18 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/math/UseCbrt.scala)
  • Edited copy of a member (18 corresponding lines) (src/main/scala-2/com/sksamuel/scapegoat/inspections/unsafe/AsInstanceOf.scala)
  • …and 4 more

Changes since last survey

  • 7 commits — 7 feature/other, 0 fixes

By area

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

Notable commits

  • change: Bump actions/setup-java from 6.0.1 to 6.1.0 (#1114)
  • change: Rename Scala version entry for clarity
  • change: Update Scala versions (#1116)
  • change: Update joda-time to 2.15.1 (#1112)
  • change: Update sbt to 2.0.12 (#1113)
  • change: Update sbt-scalafix to 0.14.10 (#1115)
  • change: Update scapegoat plugin version to use SCALA_3_LTS

Architecture

  • Unchanged — 0 containers · 1 contexts · 0 edges

Written by cca.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 14 November 2026 at a pinned commit. It is not a live figure and does not change until the project is measured again.
  • Measured at commit 51213b0c70a677d8f880689c18b5fcd782d8ab86 — the exact code this score is about.
  • Scored under rubric-2026.11.4 — the same rubric and the same method as every other entry in this index.
  • Measured by Canine Code Analyzer (cca.canine.dev) using cca measure-2026.11.65+preprod-e1a3b69fc8ee.