Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build(deps): bump mvdan.cc/gofumpt from 0.6.0 to 0.7.0 #4922

Merged
merged 2 commits into from
Aug 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ require (
golang.org/x/tools v0.24.0
gopkg.in/yaml.v3 v3.0.1
honnef.co/go/tools v0.5.1
mvdan.cc/gofumpt v0.6.0
mvdan.cc/gofumpt v0.7.0
mvdan.cc/unparam v0.0.0-20240528143540-8a5130ca722f
)

Expand Down
10 changes: 6 additions & 4 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions pkg/golinters/gofumpt/gofumpt.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"fmt"
"io"
"os"
"strings"
"sync"

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

func getLangVersion(settings *config.GofumptSettings) string {
if settings == nil || settings.LangVersion == "" {
// TODO: defaults to "1.15", in the future (v2) must be set by using build.Default.ReleaseTags like staticcheck.
return "1.15"
// TODO: defaults to "1.15", in the future (v2) must be removed.
return "go1.15"
}
return settings.LangVersion

return "go" + strings.TrimPrefix(settings.LangVersion, "go")
}

func getIssuedTextGoFumpt(settings *config.LintersSettings) string {
Expand Down
Loading