Skip to content

Commit

Permalink
build(deps): bump mvdan.cc/gofumpt from 0.6.0 to 0.7.0 (#4922)
Browse files Browse the repository at this point in the history
Co-authored-by: Fernandez Ludovic <ldez@users.noreply.github.com>
  • Loading branch information
dependabot[bot] and ldez authored Aug 16, 2024
1 parent adbdfdb commit e24ef74
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 8 deletions.
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

0 comments on commit e24ef74

Please sign in to comment.