Skip to content
SPECIFICTION
Get listed

gofmt vs Uncrustify

gofmt

go.dev

Uncrustify

github.com

Side by side

FiguregofmtUncrustify
Price fromFreeFree
Free planYesYes
Free trial——
Open source——
WindowsYesYes
macOSYesYes
LinuxYesYes
Self-hosted—Yes
Plans published11
Spec score · Code formatters7.8 (#6)7.6 (#11)
Spec score · Code Formatting Tools7.8 (#13)7.7 (#18)
DistributionThe Go installation process installs an executable called gofmt, equivalent to go fmt.The project provides source code and precompiled Windows binaries through its releases page.
Editor integrationsThe Go project documents gofmt integrations for Vim, Emacs, Eclipse, Sublime Text, Git pre-commit hooks, and Mercurial.The README links usage guidance for Vim and an Uncrustify plugin for IntelliJ.
LicenseGo is an open source project distributed under a BSD-style license.The repository identifies its license as GPL-2.0.
PlatformsThe Go compiler toolchain can target AIX, Android, DragonFly BSD, FreeBSD, Illumos, Linux, macOS/iOS, NetBSD, OpenBSD, Plan 9, Solaris, and Windows.The project lists Linux, QNX, OS X, BSD variants, Solaris 9 and Windows among operating systems it has tested.
PurposeGofmt automatically formats Go programs using tabs for indentation and blanks for alignment.Uncrustify is a source code beautifier for C, C++, C#, Objective-C, D, Java, Pawn and Vala.
SupportQuestions about using Go or announcements relevant to Go users should be sent to the golang-nuts mailing list.The project directs bug reports to its GitHub issue tracker and welcomes patches through pull requests.

Plans

gofmt

  • gofmtFree

gofmt pricing →

Uncrustify

  • UncrustifyFree

Uncrustify 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

Uncrustify

Uncrustify has no write-up on Specifiction yet; its figures are above.

Visit github.com