github mvdan/gofumpt v0.10.0

4 hours ago

This release is based on Go 1.26's gofmt, and requires Go 1.25 or later.

A new rule is introduced to drop unnecessary parentheses around expressions where the inner expression is unambiguous on its own, such as f((3)). Parentheses are kept where they are useful, such as on binary expressions. See #44.

A new rule is introduced to require multi-line function calls to match the opening and closing parenthesis in terms of the use of newlines. See #74.

The -extra flag now accepts a comma-separated list of rule names to enable individual extra rules, rather than enabling all of them at once. See #339.

The following changes are included as well:

  • Avoid crashing on go.mod files without a module directive - #350
  • Avoid failing when an ignored directory cannot be read - #351
  • Avoid prefixing more kinds of commented-out Go code with spaces - #230
  • Avoid prefixing a shebang comment with a space - #237
  • Narrow the newlines on assignments rule to ignore complex cases - #354
  • Fix three bugs which caused a second gofumpt run to make changes - #132, #345

Binaries built on go version go1.26.2 linux/amd64 with:

CGO_ENABLED=0 go build -trimpath -ldflags="-w -s"

Consider becoming a sponsor if you benefit from the work that went into this release! New tiers with rewards are available as well.

Don't miss a new gofumpt release

NewReleases is sending notifications on new releases.