# mvdan/gofumpt

A stricter gofmt

Repository: https://github.com/mvdan/gofumpt
Canonical: https://ross.abutalabs.com/products/gofumpt
Homepage: https://pkg.go.dev/mvdan.cc/gofumpt
Language: Go
License: BSD-3-Clause
License Family: permissive
Topics: go, format, style, gofmt, goimports, idiomatic
Last push: 2026-08-23T22:57:22+00:00

## Health v2 (maintenance only)
Score: 94/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 99, release rhythm 83, longevity 100
- inputs: {"age_days": 2713, "days_push": 10, "days_rel": 37, "gap_med": 83, "n_releases_24m": 6}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 4068, forks 134 (observed 2026-08-28T04:08:34.141334+00:00)

## What it is
gofumpt is a stricter, backwards-compatible fork of gofmt that formats Go source code with additional idiomatic style rules. It works as a drop-in replacement for gofmt and is also usable as a Go library via its format package.

## Use cases
- format go code with stricter rules than gofmt
- enforce idiomatic go style across a codebase
- drop-in replacement for gofmt in ci
- automatically clean up empty lines and formatting in go files
- consistent code formatting independent of go version

## When to choose
- you want stricter, more idiomatic formatting than gofmt while staying gofmt-compatible
- you need deterministic formatting regardless of the installed Go toolchain version
- you want a formatter that skips vendor, testdata, and generated files by default

## When to avoid
- you prefer standard gofmt output exactly as shipped with Go
- you need gofmt's -r rewrite flag, which gofumpt removed
- your team cannot agree on the extra opinionated rules

## Facets
- artifact type: cli-tool
- maturity: active
- function: formatter, cli, developer-tools
- domain: developer-tools, programming-languages
- platform: go, cli, cross-platform
- tags: gofmt, code-style, go-tooling, code-formatting, command-line

## Member repositories
- mvdan/gofumpt (main) score 94

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:08:34.141334+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T18:23:32.476589+00:00, confidence not recorded.
  - readme: https://github.com/mvdan/gofumpt (fetched 2026-08-28T04:08:34.141334+00:00, sha 7f8070627bb5)
  - homepage: https://pkg.go.dev/mvdan.cc/gofumpt (fetched 2026-08-29T09:15:37.094956+00:00, sha cb3b99bd557b)
  - site_page: https://pkg.go.dev/about (fetched 2026-08-29T09:15:37.098564+00:00, sha 757852027879)
  - site_page: https://go.dev/about (fetched 2026-08-29T09:15:37.100914+00:00, sha 8b6453863a90)
  - site_page: https://go.dev/project (fetched 2026-08-29T09:15:37.103259+00:00, sha d5ca00bb378b)
- Data as of 2026-08-30T08:39:29.467469+00:00.
