Skip to content

Commit

Permalink
chore: fix go version format
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Aug 16, 2024
1 parent 3d77173 commit 854b7f7
Showing 1 changed file with 5 additions and 3 deletions.
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("go", settings.LangVersion)

Check failure on line 121 in pkg/golinters/gofumpt/gofumpt.go

View workflow job for this annotation

GitHub Actions / golangci-lint

argOrder: "go" and settings.LangVersion arguments order looks reversed (gocritic)
}

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

0 comments on commit 854b7f7

Please sign in to comment.