Skip to content
CAI
Software that uses CAICheck a score

scalacenter/scalafix

58.3

Adequate · 28 September 2026

19.3k

lines of production code

Scala

primary language

2

measurements over time

CAI band scale
CAI trend line
CAI lens gauges

What this system is

Scalafix is a refactoring and linting tool for Scala codebases that operates by parsing source files and SemanticDB data to apply syntactic and semantic transformations. It provides a command-line interface and a Java API for programmatic integration, supporting rule execution across Scala 2.12, 2.13, and 3.x versions. The system enables users to enforce coding standards, remove unused code, and organize imports through a configurable set of built-in and custom rules.

How it got here

2016–2018 — Scalafix v1 API migration and CLI overhaul

52 changes.

This period focused on rebranding the project to Scalafix and migrating its core architecture from the legacy v0 API to a new v1 rule system with explicit configuration and lifecycle hooks. The team significantly expanded the CLI with structured exit codes, diff support, and shell completions, while introducing a public Java API for IDE integration. Concurrently, the codebase was stabilized through extensive refactoring of patching and linting internals, alongside a comprehensive expansion of test coverage and documentation.

2019–2023 — Scala 3 support and compatibility

39 changes.

This period focused on adding native Scala 3 support to Scalafix, including core compilation, rule execution, and source rule compilation. It also involved establishing robust compatibility layers for Scala 2.12 and 2.13 to ensure consistent behavior across versions. Extensive integration and unit tests were added to validate these changes and improve overall test coverage.

2024–2026 — Scala 3 rule support and testing

26 changes.

This period focused on extending Scalafix rules, particularly OrganizeImports, ExplicitResultTypes, and RemoveUnused, to fully support Scala 3 syntax and semantics. The work involved implementing dynamic compiler loading for Scala 3 and adding comprehensive test suites to verify correct handling of Scala 3-specific features like givens, significant indentation, and new language versions.

Features

Add Scala 3 rule compilation support via scalafix-reflect

Introduces a new Scala 3-specific implementation of the rule compiler in scalafix-reflect, enabling users to compile and run Scalafix rules written in Scala 3. This component utilizes the Scala 3 compiler (dotty) to process source rules, handling both file-based and virtual inputs, and provides appropriate error messaging if compilation fails, distinguishing it from the Scala 2.x compiler path.

scalafix-reflect/src/main/scala-3 · high confidence

Add Sonatype download statistics collection script

A new GitHub Actions script (.github/scripts/sonatype-stats.scala) has been added to automatically collect and store monthly unique IP download statistics for Scalafix artifacts (scalafix-core\_2.12, scalafix-core\_2.13, and scalafix-interfaces) from Sonatype. The script authenticates using environment variables and writes the data to local CSV files, enabling the project to track and display download metrics.

repository · high confidence

Add configuration support for custom error messages and regex patterns

New configuration classes \CustomMessage\ and \Regex\ have been added to the core configuration module. \CustomMessage\ allows users to attach custom error messages and identifiers to configuration values (such as symbols), while \Regex\ provides a structured way to define regular expression patterns with optional capture groups. These additions enable more granular control over rule configuration and error reporting in Scalafix.

scalafix-core/src/main/scala/scalafix/config · high confidence

Added Scala 3 macro-based configuration derivation

Introduced a new Scala 3 implementation for metaconfig's generic derivation capabilities in the \metaconfig.generic\ package. This change adds inline macros (\deriveEncoder\, \deriveDecoder\, \deriveCodec\, etc.) that automatically generate configuration encoders and decoders for case classes using Scala 3's \Mirror\ and quote-based metaprogramming. This allows users to seamlessly derive configuration handling for their data types without manual boilerplate, specifically targeting the Scala 3 runtime environment.

compat-metaconfig-macros · high confidence

Added example Scalafix rule definitions in test resources

A new example file (MyRule2.scala) was added to the test resources to demonstrate Scalafix rule implementations. It includes a syntactic rule that appends '1' to identifier names and a semantic rule that adds an import for scala.collection.immutable.Seq, utilizing the scalafix.v0 API.

scalafix-tests/input/src/main/resources · high confidence

Added internal Matrix utility for testkit operations

The scalafix-testkit module now includes an internal Matrix class to manage two-dimensional data structures. This utility provides methods to access rows, columns, and individual cells, facilitating more structured data handling within the testkit's internal operations.

scalafix-testkit/src/main/scala/scalafix/internal · high confidence

Added release testing and rule scaffolding scripts

Two new shell scripts have been added to the bin directory to support development and release workflows. The new-rule.sh script scaffolds new rule implementations by creating the necessary source files in the core, input, and output test directories. The test-release.sh script verifies that all published artifacts (core, reflect, rules, cli, and testkit) resolve correctly across multiple Scala versions (2.12, 2.13, and 3.x) using Coursier before a release is finalized.

bin · high confidence

CLI v1 implementation with argument expansion and shell completions

The Scalafix CLI v1 implementation introduces support for expanding command-line arguments from files (using the @ prefix) and provides generated shell completion scripts for both Bash and Zsh. It also includes a delegating callback to track lint and error counts during evaluation, and custom pretty-printing implicits for better help output formatting.

scalafix-cli/src/main/scala/scalafix/internal/v1 · high confidence

ExplicitResultTypes rule now supports Scala 3 with dynamic compiler loading

The ExplicitResultTypes rule now works for Scala 3 projects (requiring Scala 3.3.0 or later), replacing the previous Scala 2-only implementation. It uses the Scala Presentation Compiler to infer result types and includes logic to handle version mismatches between the Scalafix runtime and the target project by optionally fetching the correct compiler artifacts dynamically. If dynamic loading fails or is disabled, the rule provides clear error messages guiding users to align Scala minor versions or upgrade Scalafix.

scalafix-rules/src/main/scala-3/scalafix · high confidence

Introduce ScalametaInternals utility object

A new internal utility object, ScalametaInternals, has been added to scalafix-core to provide helper methods for interacting with Scalameta's internal APIs. This includes functions to parse symbol owners and descriptors, attach origins to syntax trees, convert semanticdb ranges to positions, and format error messages, centralizing these operations for use within the core library.

scalafix-core/src/main/scala/org · high confidence

Introduce internal diff utilities for tracking file changes

Added DiffDisable and DiffUtils modules to the internal diff package. DiffDisable provides logic to determine whether specific files or code positions are disabled for processing based on git diffs, distinguishing between new and modified files. DiffUtils wraps the difflib library to generate unified diff strings from original and revised line lists, enabling better integration with version control change tracking.

scalafix-core/src/main/scala/scalafix/internal/diff · high confidence

Introduces syntax extension methods for Scalafix trees and symbols

The scalafix-core module now exposes a \syntax\ package containing implicit extension classes that enhance the usability of Scalameta AST nodes and Scalafix internal types. Users and internal code can now call methods such as \symbol\ and \denotation\ directly on \Tree\ instances to resolve semantic information, access \resultType\ on \Symbol\ objects, and use \matches\ or \parents\ on trees. Additionally, parsed results can be converted to options via \toOption\, and input sources can be labeled consistently via \label\ on \Input\ objects.

scalafix-core/src/main/scala/scalafix/syntax · high confidence

Java API implementation for Scalafix interfaces

The scalafix-cli module now provides the concrete Scala implementations for the public Java interfaces defined in scalafix-interfaces. This includes the main Scalafix entry point (ScalafixImpl) which exposes version information and argument creation, along with supporting classes for handling diagnostics, file inputs, positions, errors, and rule metadata. These implementations bridge the internal Scala logic with the reflective Java API, enabling external tools to invoke Scalafix programmatically.

scalafix-cli/src/main/scala/scalafix/internal/interfaces · high confidence

New --diff command to apply fixes to uncommitted changes

The CLI now supports a --diff flag that allows users to run Scalafix rules against the current working directory's uncommitted changes rather than requiring a full commit or branch comparison. This new capability is implemented in the JGit integration layer, which detects whether the current directory is a Git repository, resolves the specified diff base (defaulting to the current HEAD if not specified), and generates a list of modified, added, or renamed files to process. If the directory is not a Git repository, the command fails with a clear error message.

scalafix-cli/src/main/scala/scalafix/internal/jgit · high confidence

New Java API for programmatic Scalafix integration

A new set of Java interfaces in the \scalafix-interfaces\ module provides a high-level API for build tools and IDEs to invoke Scalafix programmatically. This includes \Scalafix\ for fetching and classloading the engine via reflection, \ScalafixArguments\ for configuring runs (rules, classpaths, modes like CHECK or DRY\_RUN), and detailed evaluation models (\ScalafixEvaluation\, \ScalafixFileEvaluation\, \ScalafixDiagnostic\) that allow clients to inspect patches, view unified diffs, and handle linter errors without directly manipulating the command line.

scalafix-interfaces/src/main/java/scalafix/interfaces · high confidence

New Scalafix v1 CLI entry points

The scalafix-cli module now includes a new v1 CLI implementation located in scalafix.v1. This introduces a Main object that serves as the entry point for both standard command-line execution and Nailgun integration, delegating to the internal v1 operations. It also adds a NonZeroExitCode exception to properly handle and report non-zero exit statuses from the new CLI runner.

scalafix-cli/src/main/scala/scalafix/v1 · high confidence

New and updated linting and rewriting rules

This release introduces several new Scalafix rules and updates existing ones to improve code quality and compatibility. The new DisableSyntax rule allows users to configure and disable specific keywords (like var, null, while), tokens (semicolons, tabs), and custom regex patterns, including support for suppression anchors. The new LeakingImplicitClassVal rule automatically adds 'private' modifiers to implicit value class parameters. The new NoAutoTupling rule fixes compiler warnings by inserting explicit tuples or unit values where the compiler would have adapted arguments. The new NoValInForComprehension rule removes deprecated 'val' keywords in for-comprehension binders. The new ProcedureSyntax rule converts deprecated Scala 2 procedure syntax to explicit 'Unit' return types. The new RedundantSyntax rule removes unnecessary 'final' modifiers on objects and redundant string interpolators. The RemoveUnused rule has been unified to handle imports, terms, pattern variables, and parameters, with improved support for Scala 3 and configurable options. The ExplicitResultTypesBase trait provides a foundation for rules that insert explicit type annotations for inferred public members.

scalafix-rules/src/main/scala · high confidence

New landing page for the Scalafix website

The website now features a new landing page (index.js) that highlights Scalafix's core capabilities: refactoring, linting, and enforcing rules in CI. This page serves as the entry point for users to get started with installation and documentation.

website/pages · high confidence

New utility package for token and tree operations

The scalafix-core module introduces a new \scalafix.util\ package containing helper classes and objects for working with Scala meta tokens and trees. This includes \TokenList\ for doubly linked list traversal of tokens, \MatchingParens\ for finding matching bracket pairs, and \TokenOps\ for token classification and spacing logic. Additionally, \TreeOps\ provides extractors for selecting terms and modifiers, and utilities for inferring global symbols from tree structures, while \Api.scala\ exposes these utilities and patch extension methods for rule authors.

scalafix-core/src/main/scala/scalafix/util · high confidence

Scalafix core now supports Scala 3

The scalafix-core module has been compiled for Scala 3, introducing version-specific compatibility layers to handle API differences between Scala 2 and Scala 3. This includes new files in the scala-3 source directory that define type aliases for SemanticDB types and collection views, ensuring the core library functions correctly on the newer Scala version.

scalafix-core/src/main/scala-3 · high confidence

Support for loading and running Scalafix rules from source code

The scalafix-reflect module now includes internal utilities to discover, parse, and execute Scalafix rules directly from source files (via HTTP/HTTPS URLs, GitHub references, or local file paths). This enables users to apply rules without pre-compiling them into JARs, as the system can now fetch rule code, resolve dependencies via an auto-discovered classpath, and instantiate both v0 (legacy) and v1 rules reflectively.

scalafix-reflect/src/main/scala/scalafix/internal · high confidence

Architecture

Refactor build configuration into modular project files

The build configuration has been reorganized from a single build.sbt into dedicated Scala files within the project directory. Dependencies are now centrally defined in project/Dependencies.scala, developer information in project/Developers.scala, and binary compatibility filters in project/Mima.scala. The main build logic is extracted into project/ScalafixBuild.scala, and custom cross-compilation axes are handled by project/TargetAxis.scala. This change improves maintainability and separation of concerns in the sbt build structure.

project · high confidence

Behavioural changes

Add Scala 2.12-specific compiler compatibility layer

Introduced a new \CompilerCompat\ object for the Scala 2.12 build target to handle version-specific compiler interactions. This file provides a \closeCompat\ extension method for the Scala compiler's \Global\ class and a \serializableClass\ helper to identify serializable class symbols, ensuring correct behavior when running Scalafix rules on Scala 2.12.

scalafix-rules/src/main/scala-2.12 · high confidence

Add v0-to-v1 compatibility layer for legacy rules

Introduces a new internal \scalafix.internal.v0\ package containing adapter classes (\LegacyRule\, \LegacyRuleCtx\, \LegacySemanticRule\, \LegacySyntacticRule\, \LegacySemanticdbIndex\) that bridge the existing v0 rule API to the new v1 infrastructure. This allows legacy v0 rules to continue functioning by wrapping v0 contexts and semantic indices within v1-compatible wrappers, ensuring backward compatibility during the migration to the v1 rule system.

scalafix-core/src/main/scala/scalafix/internal/v0 · high confidence

Added Scala 2-specific internal utilities for identifier handling and global proxying

New source files have been added to the Scala 2-specific implementation directory to support cross-compilation. Identifier.scala introduces logic to determine when identifiers require backtick wrapping, including sets of alpha and symbol keywords, while GlobalProxy.scala provides a wrapper for the typedTreeAt method to ensure compatibility with the ScalafixGlobal interface.

scalafix-rules/src/main/scala-2/scalafix/internal/pc · high confidence

Added Scala 2.13-specific compiler compatibility layer

A new compatibility shim for Scala 2.13 has been introduced in the scalafix-rules module. This file provides version-specific implementations for compiler interactions, specifically adding a \closeCompat\ method for the Scala compiler's interactive global instance and defining a \serializableClass\ helper that correctly references the \Serializable\ class symbol available in the Scala 2.13 standard library definitions.

scalafix-rules/src/main/scala-2.13 · high confidence

Added helper for encoding Scala names

A new internal utility object, ScalafixScalametaHacks, has been introduced to provide a dedicated method for encoding Scala identifiers. This change encapsulates the logic for handling name encoding, likely to support the broader refactoring of how symbols and names are processed within the core library.

scalafix-core/src/main/scala/scala/meta/internal · medium confidence

AssociatedComments deprecated in favor of tree.begComment and tree.endComment

The \AssociatedComments\ class and its companion object in \scala.meta.contrib\ are now deprecated as of version 0.14.6. Users should migrate to using \tree.begComment\ and \tree.endComment\ on tree instances to access associated comments, which provides a more direct and consistent API. The existing \AssociatedComments\ implementation remains available for backward compatibility but will emit deprecation warnings.

scalafix-core/src/main/scala/scala/meta/contrib · high confidence

Deprecated v0 API imports in favor of v0-specific packages

The main scalafix package now re-exports legacy v0 types (such as Rule, SemanticRule, Database, Document, and various semantic symbols) with deprecation warnings directing users to use import scalafix.v0.\_ instead. This change signals that the generic import scalafix.\_ is being phased out in version 0.6.0, and users must explicitly import from the v0 namespace to continue using these APIs.

scalafix-core/src/main/scala/scalafix · high confidence

Deprecation of legacy ScalafixReflect API

The \ScalafixReflect\ object is now deprecated as of version 0.6.0. Its \syntactic\ and \semantic\ methods, which previously provided \ConfDecoder\ instances for \v0.Rule\, now throw \UnsupportedOperationException\ and direct users to migrate to \scalafix.v1.RuleDecoder.decoder()\.

scalafix-reflect/src/main/scala/scalafix/reflect · high confidence

Deprecation of the legacy v0 Scalafix API

The legacy \scalafix.v0\ API, including the \Rule\ base class, \RuleCtx\, and \SemanticdbIndex\, is now deprecated in favor of the newer \scalafix.v1\ API. Users writing custom rules or linting logic should migrate to \scalafix.v1.Rule\ and \scalafix.v1.SyntacticRule\/\SemanticRule\ to ensure continued support, as the v0 interfaces are marked for removal in future versions.

scalafix-core/src/main/scala/scalafix/v0 · high confidence

ExplicitResultTypes rule now uses a dedicated Scala 2 compiler integration

The ExplicitResultTypes rule has been refactored to use a new CompilerTypePrinter and Scala 2-specific printer implementation. This change replaces previous tree-method usage with a more robust compiler integration that correctly handles type printing, import management, and symbol resolution for Scala 2 codebases. Users will see more accurate explicit type annotations added to definitions, with improved handling of complex types and imports.

scalafix-rules/src/main/scala-2/scalafix/internal/rule · high confidence

Introduce RuleCtxImpl as the concrete rule context implementation

A new RuleCtxImpl class has been added to scalafix-core to serve as the concrete implementation of the RuleCtx interface. This change centralizes access to syntax, tokens, and configuration within the rule execution context, providing direct token access from the tree and integrating with the EscapeHatch mechanism for handling rule exclusions. Users will benefit from a more streamlined internal structure for rule processing, though this is primarily an internal refactoring with no direct user-facing API changes.

scalafix-core/src/main/scala/scalafix/internal/rule · high confidence

Introduce internal v1 API for parsing and representing SemanticDB documents

The \scalafix-core\ module now includes a new internal \v1\ package that provides the infrastructure for loading, parsing, and representing SemanticDB data. This change introduces \InternalSemanticDoc\ and \InternalDoc\ to manage syntactic and semantic document state, along with \DocumentFromProtobuf\ and \SymtabFromProtobuf\ to convert raw SemanticDB protobuf messages into Scalafix's internal \SemanticTree\ and \SymbolInformation\ types. Supporting utilities such as \LazyValue\ for deferred evaluation, \PositionSearch\ for tree navigation, and \FingerprintOps\ for MD5 verification are also added. This refactoring establishes the foundation for the v1 rule API by decoupling the raw SemanticDB format from the higher-level Scalafix abstractions.

scalafix-core/src/main/scala/scalafix/internal/v1 · high confidence

Introduce v1 API with explicit configuration and rule lifecycle hooks

The \scalafix.v1\ package now exposes a \Configuration\ class that explicitly carries \scalaVersion\, \scalacOptions\, and \scalacClasspath\, allowing rules to validate required compiler flags (such as unused warnings) during setup via \withConfiguration\. The \Rule\ base class has been updated with \beforeStart\ and \afterComplete\ lifecycle hooks, and the \Symbol\ API now provides an \info\ method that returns \Option\[SymbolInformation\]\ using an injected symbol table, enabling rules to access detailed symbol metadata.

scalafix-core/src/main/scala/scalafix/v1 · high confidence

Introduces internal utility helpers for pretty-printing, GitHub authentication, and lint diagnostics

The internal utility package now includes new helpers that improve how Scalafix displays type information and handles external rule sources. A new \Pretty\ object provides a holistic pretty-printing strategy for \scalafix.v1\ types, including support for \LambdaType\ and \MatchType\, while \DocConstants\ standardizes symbol rendering. \FileOps\ now supports authenticated access to GitHub rule sources by using the latest GitHub REST API version and bearer tokens, and \LintSyntax\ simplifies lint infrastructure by introducing \Diagnostic\-based extensions. Additional utilities like \DenotationOps\ and \PositionSyntax\ improve type parsing and error message formatting for users.

scalafix-core/src/main/scala/scalafix/internal/util · high confidence

Lint infrastructure renamed to Diagnostic with deprecation aliases

The linting subsystem has been refactored to use a new \Diagnostic\ type, replacing the previous \LintMessage\ and \LintCategory\ abstractions. A new \RuleDiagnostic\ class now wraps these diagnostics to associate them with specific rules and handle severity overrides from configuration. For backward compatibility, the old \LintMessage\ and \LintCategory\ types are retained as deprecated aliases pointing to the v0 implementation, encouraging users to migrate to the new diagnostic model.

scalafix-core/src/main/scala/scalafix/lint · high confidence

Migrate documentation site to Docusaurus

The documentation website has been migrated to Docusaurus, introducing a new site structure with separate User and Developer guides. This change enables Algolia search functionality, adds a 'Browse sources' link to the header for navigating the Scalafix codebase, and reorganizes content into specific sections for installation, configuration, rules, and contributing guidelines.

website · high confidence

Migrate documentation site to Docusaurus with custom mdoc modifiers

The documentation build system has been migrated to Docusaurus, introducing a new Scala-based generation pipeline in scalafix-docs. This includes custom mdoc StringModifiers (FileModifier, HelpModifier, RuleModifier, RulesModifier) to embed live rule descriptions and help text into the docs, and a website helper package (website.scala) to generate rule tables and configuration documentation. A new PatchDocs module provides utilities for rendering patch outputs and diffs in documentation examples, while Main.scala orchestrates the build process, injecting version variables and copying the contributing guide.

scalafix-docs · high confidence

New internal APIs for dependency resolution and isolated class loading

The scalafix-interfaces module now includes two new internal classes to support higher-level class loading and dependency fetching. ScalafixCoursier provides a Java wrapper around Coursier to fetch the scalafix-cli JAR and tool classpath dependencies, handling repository configuration and dependency exclusions. ScalafixInterfacesClassloader implements a specialized class loader that isolates scalafix-interfaces and coursierapi classes from the parent classloader, enabling safe casting of runtime instances from the scalafix-cli classloader into the scalafix.interfaces.Scalafix interface.

scalafix-interfaces/src/main/java/scalafix/internal · high confidence

Project rebranding to Scalafix and license migration to BSD-3-Clause

The project has officially rebranded from 'migrate4s' to 'Scalafix', updating the README, documentation, and configuration files to reflect the new identity. Concurrently, the project license has changed from Apache 2.0 to BSD-3-Clause, with the old LICENSE file removed and new LICENSE.md and NOTICE.md files added to track third-party code origins (LazySymbolTable, scalafix.v0, OrganizeImports).

(repo-wide) · high confidence

Refactor testkit to use AnyFunSuite and new document abstractions

The testkit framework has been refactored to extend \AnyFunSuite\ instead of the deprecated \TestRegistration\, and now relies on the new \SyntacticDocument\ and \SemanticDocument\ abstractions (renamed from \Doc\ and \SemanticDoc\). This change updates the internal test execution logic in \AbstractSemanticRuleSuite\ and \AbstractSyntacticRuleSuite\ to work with these new types, ensuring compatibility with the updated Scalameta and Scalafix core APIs.

scalafix-testkit/src/main/scala/scalafix/testkit · high confidence

Refactored Scala 3 presentation compiler integration for dynamic loading

The Scala 3 presentation compiler integration has been restructured to support dynamic loading of the compiler when it is not present on the classpath. A new \Embedded\ component now handles fetching the \scala3-presentation-compiler\ dependency via Coursier and loading it in an isolated classloader, while a dedicated \PresentationCompilerClassLoader\ ensures shared access to necessary types like LSP4J and Gson. The \PresentationCompilerTypeInferrer\ class has been renamed from \PcExplicitResultTypes\ and now wraps the compiler in a lazy value, improving how type inference patches are applied and ensuring atomicity when adding global imports.

scalafix-rules/src/main/scala-3/pc · high confidence

Refactored configuration parsing infrastructure

The internal configuration parsing logic in scalafix-core has been reorganized into dedicated utility objects (MetaconfigOps, ReaderUtil) and a consolidated readers trait (ScalafixMetaconfigReaders). This change introduces helper methods for traversing configuration results, converting between metaconfig and scalameta input/position types, and provides a unified collection of ConfDecoder instances for scalafix-specific types such as symbols, regexes, and importers, while also defining the ScalafixReporter interface for diagnostic output.

scalafix-core/src/main/scala/scalafix/internal/config · high confidence

Refactored patching internals and deprecated legacy API

The patching logic in scalafix-core has been reorganized into dedicated files (ImportPatchOps, ReplaceSymbolOps, LegacyPatchOps) to improve maintainability. Import patching now uses token-based traversal methods and excludes moved symbols from collision detection to prevent compile errors. The legacy PatchOps methods (e.g., removeImportee, addGlobalImport) are now deprecated in favor of the new Patch API. A new CrashingSemanticdbIndex trait and a compiler-free SymbolTable interface were added to support internal testing and decouple core from specific compiler implementations.

scalafix-core/src/main/scala/scalafix/internal/patch · high confidence

Refactored rule loading into a new RuleDecoder component

The logic for loading Scalafix rules has been consolidated into a new \RuleDecoder\ object within the \scalafix-reflect\ module. This component now serves as the central handler for parsing rule specifications from configuration strings, supporting loading via fully qualified class names, file paths, and GitHub URIs. It also manages the decoding of rule lists from configuration files and handles the integration of syntactic filtering and patch application during the loading process.

scalafix-reflect/src/main/scala/scalafix/v1 · high confidence

Reintroduce CLI entry point and structured exit status handling

The scalafix-cli module now includes a dedicated Cli object that delegates execution to the core scalafix.v1.Main implementation, restoring the command-line interface entry point. Additionally, a new ExitStatus system has been introduced to provide granular, named exit codes (such as ParseError, LinterError, and NoFilesError) instead of generic return values, allowing users and scripts to distinguish between different failure modes more precisely.

scalafix-cli/src/main/scala/scalafix/cli · high confidence

Rename SemanticPatchOps to PatchOps and move to /patch

The \SemanticPatchOps\ trait has been renamed to \PatchOps\ and relocated to the \scalafix/patch\ package. This change consolidates the API for applying code patches—such as removing or adding imports, replacing tokens, and handling symbol replacements—into a single, more clearly named interface within the core patching module.

scalafix-core/src/main/scala/scalafix/patch · high confidence

Support for compiling Scala 2 source rules in Scala 3 environments

Added a new isolated compilation path in scalafix-reflect that allows source rules written in Scala 2 to be compiled when the scalafix CLI itself is running on Scala 3. This resolves binary incompatibility issues between the Scala 3 runtime and the Scala 2.13 compiler by fetching a matching Scala 2.13 standard library via Coursier and loading the compiler in a separate classloader. The implementation introduces a Java-based bridge (CompilationResult, CompilerMessage) and a Scala 2 bridge class (Scala2CompilerBridge) to safely cross classloader boundaries, ensuring that users can continue to use Scala 2 source rules without encountering classpath conflicts.

scalafix-reflect/src/main/scala-2 · high confidence

Update Scalafix branding and website styling

The website now uses a new Scalafix brand logo (scalafix-brand-raw.svg) and applies custom CSS styles (custom.css) to adjust the layout, including header image margins, block image sizing, and responsive breakpoints for mobile and desktop views.

website/static · high confidence

Updated Pretty expect files for Scala 2.12, 2.13, 3.5, 3.6, and 3.7

The integration test expectation files for the Pretty printer have been regenerated to reflect changes in semantic representation across Scala versions. For Scala 2.12, the output now includes explicit collection builder types (e.g., \List.canBuildFrom\) in method chains. For Scala 2.13, these builder types are omitted. For Scala 3.x (3.5, 3.6, 3.7), the output reflects the new base class \Object\ instead of \AnyRef\, uses \&\ for intersection types, and includes explicit \Option.apply\ and \Future.apply\ calls in the pretty-printed output where they were previously implicit or abbreviated.

scalafix-tests/integration/src/main · high confidence

Updated Scala 2.12 compatibility layer for collection views

The Scala 2.12 compatibility shim in scalafix-core now explicitly defines \View\ and \SeqView\ types using \collection.SeqView\ and \collection.Seq\ respectively, aligning with the internal type structure of Scala 2.12 while maintaining parity with the Scala 2.13 implementation which uses \collection.View\ and \collection.SeqView\.

scalafix-core/src/main/scala-2.12 · high confidence

Updated list of available Scalafix rules

The service provider configuration for Scalafix rules has been updated to include RedundantSyntax and LeakingImplicitClassVal, while removing NoAutoTupling, NoValInForComprehension, and ProcedureSyntax from the default set of available rules.

scalafix-rules/src/main/resources · high confidence

The website's footer component has been updated to replace the previous Gitter support link with a link to the project's Discord server, reflecting a shift in community support channels. The footer also retains links to documentation (installation, rules, extending Scalafix), the Scala Users forum, and the GitHub repository.

website/core · high confidence

Test coverage

Added OrganizeImports test cases for comment preservation, trailing commas, and Scala 3 keywords; Added Scala 2.13 test fixtures for explicit result types, redundant syntax, and unused code removal; Added Scala 3 OrganizeImports test fixtures; Added Scala 3 OrganizeImports test fixtures for givens, multi-line imports, and dialect handling; Added Scala 3 compatibility test utilities for SemanticDB; Added Scala 3 test cases for parsing and type signature decoration; Added Scala 3.3 test cases for ExplicitResultTypes and RemoveUnused rules; Added StringFS test utility for in-memory file system operations; Added expect tests for ScalatestAutofixRule and ServiceLoaders; Added explicit-result-type tests for Scala 3 edge cases; Added explicit-result-types test cases for complex Scala type scenarios; Added integration and unit tests for v0 legacy denotation and symbol matching; Added integration test suite for Scalafix rules; Added integration test utilities for expect-based testing; Added integration tests for Scalafix CLI behavior; Added integration tests for SymbolMatcher and Symbol APIs; Added integration tests for semantic symbol resolution; Added integration tests for the Scalafix Java interfaces; Added test cases for ExplicitResultTypes with backquotes and immutable sequences; Added test cases for NoAutoTupling fix behavior; Added test cases for NoValInForComprehension rule; Added test cases for OrganizeImports rule behavior; Added test cases for RemoveUnused rule on Scala 3 Next; Added test cases for RemoveUnused with Scala 3 significant indentation; Added test cases for Scala 3 RemoveUnused rule; Added test cases for Scala 3 import organization and unused import removal; Added test cases for Scala 3.5+ and 3.6+ syntax features; Added test cases for unused parameters and statements in Scala 2; Added test coverage for DisableSyntax rule options; Added test fixtures for OrganizeImports edge cases; Added test fixtures for ScalaTest autofix matchers; Added test fixtures for scalafix rule validation; Added test fixtures for symbol migration patches; Added test for ExplicitResultTypes fetchScala3CompilerArtifactsOnVersionMismatch flag; Added test for OrganizeImports with Scala 3 Givens; Added test inputs for ExplicitResultTypes rule; Added test inputs for ExplicitResultTypes, RedundantSyntax, and ExplicitSynthetic rules; Added test inputs for NoAutoTupling rule behavior; Added test inputs for scalafix rules and patches; Added test outputs for OrganizeImports scenarios; Added test suite for ExplicitResultTypes rule Scala 3 compatibility check; Added test utilities for SemanticDB plugin compatibility; Added test utilities for file system and Git operations; Added tests for ExplicitResultTypes Scala 3 version compatibility; Added tests for GitHub URL rule configuration parsing; Added tests for LambdaType synthetic output in LegacyCodePrinter; Added tests for LeakingImplicitClassVal rule in Scala 3; Added tests for PrettyType symbol resolution and fuzzing; Added tests for RedundantSyntax final object removal and suppression; Added tests for RedundantSyntax string interpolator rules; Added tests for RemoveUnused pattern variable handling in Scala 2.12; Added tests for RemoveUnused rule edge cases; Added tests for Scala 3 DisableSyntax rules; Added tests for Scala 3 source compatibility in import organization and removal; Added tests for legacy synthetic code printing; Added tests for source rule decoding and tool classpath handling; Added tests for specific DisableSyntax rules in Scala 2; Added utility extension methods for List and String in test fixtures; Expanded test coverage for ExplicitResultTypes rule; Expanded test coverage for OrganizeImports rule behaviors; Expanded unit test coverage for scalafix core and configuration logic; Test coverage for escape hatch anchor and annotation interactions.

Dependencies

Migrate website to Docusaurus

The project website scaffolding has been switched to Docusaurus, introducing a new \website/package.json\ that adds Docusaurus 1.14.4 as a development dependency for building and publishing the documentation site.

(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 65 → 58 (-6.3)
  • Rubric changed (rubric-2026.09.8 → rubric-2026.09.16) — scores are not directly comparable.

Lenses

  • Code Health 89 → 89 (+0.0)
  • Architecture 97 → 81 (-16.6)
  • Maturity 52 → 52 (-0.1)
  • Readiness 73 → 50 (-22.1)
  • Security 70 → 74 (+3.7)

Resolved (6)

  • Documentation: no project overview
  • Documentation: no usage examples (README.md)
  • Hotspot: scalafix-core/src/main/scala/scalafix/internal/v0/LegacySemanticdbIndex.scala (scalafix-core/src/main/scala/scalafix/internal/v0/LegacySemanticdbIndex.scala)
  • Hotspot: scalafix-rules/src/main/scala/scalafix/internal/rule/DisableSyntax.scala (scalafix-rules/src/main/scala/scalafix/internal/rule/DisableSyntax.scala)
  • Off-boarding risk: anonymized user #1
  • Off-boarding risk: anonymized user #2

New (7)

  • Dependency hygiene PARTLY measured — npm pinning read, dependency currency not (no committed lockfile, so no resolved version to grade)
  • Documentation: no installation or build instructions (docs/users/cross-building.md)
  • Documentation: no project overview (README.md)
  • Off-boarding risk: anonymized user #1
  • Off-boarding risk: anonymized user #2
  • Projects may be oversized for their cohesion
  • Scanner failed to run — not a clean result

Changes since last survey

  • 10 commits — 9 feature/other, 1 fixes

By area

  • (repo) — 4 commits
  • .github/workflows — 1 commit
  • project/Dependencies.scala — 1 commit
  • project/plugins.sbt — 1 commit
  • scalafix-cli/src — 1 commit
  • scalafix-core/src — 1 commit
  • scalafix-tests/input — 1 commit

Notable commits

  • fix: add regression test for #2473
  • change: Add --dry-run to report linter errors without rewriting files (#2515)
  • change: Bump VirtusLab/scala-cli-setup from 1.16 to 1.17
  • change: Bump VirtusLab/scala-cli-setup from 1.16 to 1.17 (#2518)
  • change: Merge pull request #2513 from bjaglin/scalameta4174
  • change: Merge pull request #2514 from scalacenter/scalameta4174test
  • change: Merge pull request #2516 from scalacenter/post0149
  • change: don't target all sources when --diff reports only deletions (#2508)
  • change: sbt-scalafix 0.14.9
  • change: scalameta 4.17.4

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

scalacenter/scalafix 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 41cf7983a19a0453be78d1fe9863d77470ca6dec — 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-2d9048c36d26.