Skip to content
SPECIFICTION
Get listed

gofmt vs Spotless

gofmt

go.dev

Spotless

github.com

Side by side

FiguregofmtSpotless
Price fromFreeFree
Free planYesYes
Free trial—Yes
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Plans published12
Spec score · Code formatters7.8 (#6)7.3 (#14)
Spec score · Code Formatting Tools7.8 (#13)7.3 (#28)
Editor integrationsThe Go project documents gofmt integrations for Vim, Emacs, Eclipse, Sublime Text, Git pre-commit hooks, and Mercurial.The README links Spotless integrations for VS Code and IntelliJ.
LicenseGo is an open source project distributed under a BSD-style license.The GitHub repository identifies its license as Apache-2.0.
PurposeGofmt automatically formats Go programs using tabs for indentation and blanks for alignment.Spotless formats source code and can check files for formatting violations or apply fixes.
SupportQuestions about using Go or announcements relevant to Go users should be sent to the golang-nuts mailing list.DiffPlug directs questions to its forum and lists a technical support contact on its About page.

Plans

gofmt

  • gofmtFree

gofmt pricing →

Spotless

  • FreeFree
  • dp.simstate.differPrice not published

Spotless pricing →

In their own words

gofmt

gofmt is the Go source formatter distributed with Go installations, available on Linux, macOS, and Windows. It formats Go programs using tabs for indentation and spaces for alignment. With no path, it reads standard input; given a directory, it processes .go files recursively while skipping files whose names begin with a period. By default, reformatted source is written to standard output. Flags can show differences, list files that need formatting, apply rewrite rules, simplify code, or report all errors. The rewrite option uses patterns and replacements written as valid Go expressions. gofmt can also arrange documentation comments into canonical paragraphs, lists, headings, links, and code blocks. The Go project documents integrations for Vim, Emacs, Eclipse, and Sublime Text, plus Git pre-commit hooks and Mercurial. Since Go 1.18, it reads and formats files concurrently, with memory use limited in proportion to GOMAXPROCS. The executable is equivalent to go fmt. It is free, included in the Go installation, and distributed under a BSD-style license.

Visit go.dev

Spotless

Spotless formats source code and can check files for formatting violations or apply fixes. It supports languages and formats including Java, Kotlin, JavaScript, Python, SQL, YAML, and Markdown, with formatter options such as Google Java Format, ktlint, Prettier, ESLint, Black, and ScalaFmt. The project integrates with Gradle and Maven and links to an external SBT integration. Its README links to VS Code and IntelliJ integrations. Spotless lists automatic idempotency and encoding safeguards for Gradle, Maven, and SBT. Git-based features include ratcheting from a Git reference for Gradle and Maven, and Git-defined line endings for all three build tools. Some capabilities, including ratcheting and fast incremental formatting, are unavailable in SBT. The repository identifies the license as Apache-2.0. Spotless is available for Linux, macOS, and Windows. DiffPlug directs questions to its forum and lists a technical support contact; security disclosures can be sent to [email protected]. Its plan listing includes a free plan at free, billed free forever with no registration required, and also lists a free trial.

Visit github.com