Skip to content

Commit 39b4efc

Browse files
dependabot[bot]ldez
authored andcommitted
build(deps): bump mvdan.cc/gofumpt from 0.6.0 to 0.7.0 (golangci#4922)
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
1 parent 53bf9f4 commit 39b4efc

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ require (
129129
golang.org/x/tools v0.24.0
130130
gopkg.in/yaml.v3 v3.0.1
131131
honnef.co/go/tools v0.5.1
132-
mvdan.cc/gofumpt v0.6.0
132+
mvdan.cc/gofumpt v0.7.0
133133
mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f
134134
)
135135

go.sum

Lines changed: 6 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/golinters/gofumpt/gofumpt.go

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import (
55
"fmt"
66
"io"
77
"os"
8+
"strings"
89
"sync"
910

1011
"github.com/shazow/go-diff/difflib"
@@ -113,10 +114,11 @@ func runGofumpt(lintCtx *linter.Context, pass *analysis.Pass, diff differ, optio
113114

114115
func getLangVersion(settings *config.GofumptSettings) string {
115116
if settings == nil || settings.LangVersion == "" {
116-
// TODO: defaults to "1.15", in the future (v2) must be set by using build.Default.ReleaseTags like staticcheck.
117-
return "1.15"
117+
// TODO: defaults to "1.15", in the future (v2) must be removed.
118+
return "go1.15"
118119
}
119-
return settings.LangVersion
120+
121+
return "go" + strings.TrimPrefix(settings.LangVersion, "go")
120122
}
121123

122124
func getIssuedTextGoFumpt(settings *config.LintersSettings) string {

0 commit comments

Comments
 (0)