Skip to content
SPECIFICTION
Get listed

CSharpier vs Scalafmt

CSharpier

csharpier.com

Scalafmt

scalameta.org

Side by side

FigureCSharpierScalafmt
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
APIYes—
Self-hosted—Yes
Plans published11
Spec score · Code Formatting Tools8.0 (#8)7.6 (#22)
ConfigurationConfiguration can use .csharpierrc JSON or YAML files or .editorconfig, with options including print width, tabs, indentation, and line endings.Formatting options are set in a plain text .scalafmt.conf file using HOCON syntax.
Editor integrationsOfficial extensions or plugins are listed for Visual Studio 2022, Visual Studio 2019, Visual Studio Code, and Rider; the page also describes setups for Neovim, Emacs, and Zed.The documentation describes use with IntelliJ, VS Code, Vim, NeoVim, Emacs, Sublime Text, and Eclipse, with Metals supporting formatting requests from editors.
PurposeCSharpier parses C# and XML code and reprints it using its own formatting rules.Scalafmt is a code formatter for Scala that formats code consistently across a team.

Plans

CSharpier

  • FreeFree

CSharpier pricing →

Scalafmt

  • FreeFree

Scalafmt pricing →

In their own words

CSharpier

CSharpier is a free, open-source formatter for C# and XML. It parses source files and reprints them using its own formatting rules, with only a few basic options rather than a broad set of style switches. The homepage states support through C# version 14. Configuration can be kept in .csharpierrc JSON or YAML files or in .editorconfig, covering print width, tabs, indentation, and line endings. CSharpier runs as a .NET tool, installed for one project or globally, and CSharpier.Core provides a NuGet API for formatting from code. It can check files and returns a failing exit code by default when formatting is incorrect. Automation options include pre-commit hooks, MSBuild builds, and CI/CD workflows. Integrations are listed for Visual Studio 2022 and 2019, Visual Studio Code, Rider, Neovim, Emacs, and Zed. It runs on Windows, macOS, and Linux. Code that cannot compile produces error diagnostics instead of being formatted.

Visit csharpier.com

Scalafmt

Scalafmt is a free Scala code formatter for keeping formatting consistent across a team. It handles Scala 2, Scala 3, sbt files and Scala scripts, with one dialect selected for each file. Formatting options are stored in a plain-text .scalafmt.conf file using HOCON syntax. Since version 3.1.0, the configuration must explicitly specify both the version and runner.dialect. Scalafmt can run from an editor, build tool or terminal. Documented editor integrations include IntelliJ, VS Code, Vim, NeoVim, Emacs, Sublime Text and Eclipse; Metals supports formatting requests from editors. It integrates with sbt and documents integrations for Maven, Gradle and Mill. Command-line check and test modes report misformatted code without writing changes. It also supports ignoring files, changed-lines formatting and a library API. IntelliJ range formatting uses IntelliJ’s own formatter by default: Scalafmt is designed primarily for whole files, and selected ranges may produce undesirable results. The project license is Apache-2.0.

Visit scalameta.org