FREEDOM251

Freedom251 › Compare

Side by side

gofmt vs Scalafmt

Both stand on code formatting tools. Which one you can start free with, which one lets you read the code, and what each costs once you pay.

gofmt

Free plan LinuxMacWindows

gofmt provides a focused way to format Go source, with options for checking differences and applying transformations. Its documented integrations make it usable alongside several editors and version-control workflows.

Visit gofmt

Scalafmt

Free plan LinuxMacSelf-hosted+1

Choose Scalafmt if you need a free, open-source formatter for Scala projects and want to run it through editors, builds, or the command line. Its main caveat is IntelliJ range formatting, which defaults to IntelliJ’s formatter and may not suit Scalafmt’s whole-file approach.

Visit Scalafmt

The facts

gofmtScalafmt
Free planYesYes
Open sourceNot publishedNot published
Runs onLinux, Mac, WindowsLinux, Mac, Self-hosted, Windows
Lowest paid planFree or on requestFree or on request
Plans published11
MakerNot publishedNot published
Websitego.devscalameta.org
On code formatting tools#13 of 34#17 of 34

gofmt: what it does well

  • Free executable included with Go installations.
  • Can format directories recursively.
  • Options include diffs, simplification, and rewrite rules.
  • Documented editor and version-control integrations.
  • Supports Linux, macOS, and Windows.

What to know first

  • Formats Go programs only.
  • Directory processing skips files beginning with a period.
  • Default output goes to standard output.

Scalafmt: what it does well

  • Formats Scala 2, Scala 3, sbt files, and Scala scripts.
  • Runs from editors, build tools, or the terminal.
  • Offers check and test modes that do not write changes.
  • Supports ignoring files and formatting changed lines.
  • Apache-2.0 licensed and open source.

What to know first

  • IntelliJ range formatting uses IntelliJ’s own formatter by default.
  • Configuration must explicitly set version and runner.dialect since 3.1.0.

Alternatives to gofmt Alternatives to Scalafmt The whole list