mirror of
https://github.com/goreleaser/goreleaser.git
synced 2025-03-17 20:47:50 +02:00
fix: lint issues
Signed-off-by: Carlos Alexandro Becker <caarlos0@users.noreply.github.com>
This commit is contained in:
parent
60f12deae0
commit
7552d0b4e0
@ -672,7 +672,7 @@ func TestGetChangeloger(t *testing.T) {
|
||||
ctx.TokenType = context.TokenTypeGitea
|
||||
c, err := getChangeloger(ctx)
|
||||
require.NoError(t, err)
|
||||
require.IsType(t, c, &scmChangeloger{})
|
||||
require.IsType(t, &scmChangeloger{}, c)
|
||||
})
|
||||
|
||||
t.Run("invalid", func(t *testing.T) {
|
||||
|
@ -160,7 +160,7 @@ func proxyBuild(ctx *context.Context, build *config.Build) error {
|
||||
log.Debugf("tidying")
|
||||
cmd := exec.CommandContext(ctx, ctx.Config.GoMod.GoBinary, "get", ctx.ModulePath+"@"+ctx.Git.CurrentTag)
|
||||
cmd.Dir = dir
|
||||
cmd.Env = append(ctx.Config.GoMod.Env, os.Environ()...)
|
||||
cmd.Env = append(ctx.Config.GoMod.Env, os.Environ()...) //nolint: gocritic
|
||||
if out, err := cmd.CombinedOutput(); err != nil {
|
||||
return newDetailedErrProxy(err, string(out))
|
||||
}
|
||||
|
@ -458,7 +458,7 @@ func create(ctx *context.Context, fpm config.NFPM, format string, artifacts []*a
|
||||
}
|
||||
|
||||
if !strings.HasSuffix(packageFilename, ext) {
|
||||
packageFilename = packageFilename + ext
|
||||
packageFilename += ext
|
||||
}
|
||||
|
||||
path := filepath.Join(ctx.Config.Dist, packageFilename)
|
||||
|
@ -560,7 +560,7 @@ func testSBOMCataloging(
|
||||
}),
|
||||
)
|
||||
|
||||
wantFiles := append(artifacts, sbomPaths...)
|
||||
wantFiles := append(artifacts, sbomPaths...) //nolint: gocritic
|
||||
sort.Strings(wantFiles)
|
||||
require.ElementsMatch(tb, wantFiles, gotFiles, "SBOM paths differ")
|
||||
|
||||
|
@ -705,7 +705,7 @@ func testSign(
|
||||
}),
|
||||
)
|
||||
|
||||
wantFiles := append(artifacts, signaturePaths...)
|
||||
wantFiles := append(artifacts, signaturePaths...) //nolint: gocritic
|
||||
sort.Strings(wantFiles)
|
||||
require.ElementsMatch(tb, wantFiles, gotFiles)
|
||||
|
||||
|
@ -173,10 +173,6 @@ func TestFindBinaries(t *testing.T) {
|
||||
goarm := ""
|
||||
gomips := ""
|
||||
goamd64 := ""
|
||||
switch goos {
|
||||
case "windows":
|
||||
ext = ".exe"
|
||||
}
|
||||
if goos == "windows" {
|
||||
ext = ".exe"
|
||||
}
|
||||
|
@ -4,7 +4,6 @@ import (
|
||||
"bytes"
|
||||
"fmt"
|
||||
"os"
|
||||
"path/filepath"
|
||||
"strings"
|
||||
"testing"
|
||||
|
||||
@ -50,7 +49,7 @@ func TestFile(t *testing.T) {
|
||||
f, err := os.CreateTemp(t.TempDir(), "config")
|
||||
require.NoError(t, err)
|
||||
require.NoError(t, f.Close())
|
||||
_, err = Load(filepath.Join(f.Name()))
|
||||
_, err = Load(f.Name())
|
||||
require.NoError(t, err)
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user