Skip to content
SPECIFICTION
Get listed

Coccinelle vs Scalafix

Coccinelle

coccinelle.gitlabpages.inria.fr

Scalafix

scalacenter.github.io

Side by side

FigureCoccinelleScalafix
Price fromFree—
Free planYes—
Free trial——
Open source——
Windows—Yes
macOSYesYes
LinuxYesYes
Plans published10
Spec score · Code Refactoring Tools7.9 (#9)7.0 (#20)
PurposeCoccinelle is a program matching and transformation engine that uses SmPL to specify desired matches and transformations in C code.Scalafix is a refactoring and linting tool for Scala.

Plans

Coccinelle

  • CoccinelleFree

Coccinelle pricing →

Scalafix

No plans published.

Scalafix pricing →

In their own words

Coccinelle

Coccinelle is a free program matching and transformation engine for working with C code. It uses SmPL to describe code patterns and the transformations to apply when matches are found. A single semantic patch can change code at many sites across hundreds of files while allowing for differences in spacing, variable names, irrelevant code, and coding style. The project describes uses including automating collateral changes after library API evolution and finding and fixing bugs in systems code. Coccinelle semantic patches and bug fixes have been integrated into the official Linux tree, and semantic patches are available in the Linux scripts directory for use with coccicheck. It supports C and C++, with C++ mode invoked using --c++; the project says its C++ support is still being extended, including for high performance computing. The download page lists version 1.3.3, dated September 2, 2026, with source code and precompiled spatch builds. It is available for Linux and macOS as desktop software. Source builds require OCaml, with Python and Menhir needed in specified cases.

Visit coccinelle.gitlabpages.inria.fr

Scalafix

Scalafix is a refactoring and linting tool for Scala that automates routine code-health work and one-time migrations. It reports patterns that may lead to production bugs or conflict with coding style, and teams can run rules during code review. Its check option fails when linting or fixes are needed. Syntactic rules run directly on source code; semantic rules need compiled sources with the SemanticDB compiler plugin enabled. Built-in rules include OrganizeImports, RemoveUnused, DisableSyntax, ProcedureSyntax, and RedundantSyntax. Developers can also create custom lint and rewrite rules through its public API. The official build integration is for sbt. Documentation also lists externally maintained integrations for scala-cli, Mill, Gradle, Maven, and Mega-Linter, whose integration supports only built-in syntactic rules. Scalafix is tested on macOS, Linux, and Windows. Listed tested Scala versions are 2.12.21, 2.13.18, and 3.9.0 LTS. It is no longer published for Scala 2.11 or sbt 0.13.x. Community help is available through Discord and Scala Users. The tool is free.

Visit scalacenter.github.io