Skip to content

Commit aa6a912

Browse files
authored
Merge pull request #4079 from cpanato/updates
bump golangci-lint and allow release-assets.githubusercontent.com
2 parents c8366fc + 53d7ee8 commit aa6a912

File tree

11 files changed

+15
-3
lines changed

11 files changed

+15
-3
lines changed

.github/workflows/lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,4 @@ jobs:
3232
- name: golangci-lint
3333
uses: golangci/golangci-lint-action@4afd733a84b1f43292c63897423277bb7f4313a9 # v8.0.0
3434
with:
35-
version: v2.1
35+
version: v2.3

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ linters:
8181
- usetesting
8282
- wastedassign
8383
- whitespace
84-
- wsl
84+
- wsl_v5
8585
- zerologlint
8686
# - cyclop
8787
# - depguard

cmd/krel/cmd/sign_blobs.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ func runSignBlobs(signOpts *signOptions, signBlobOpts *signBlobOptions, args []s
141141
}
142142

143143
var tempDir string
144+
144145
defer func() {
145146
if tempDir != "" {
146147
os.RemoveAll(tempDir)

cmd/publish-release/cmd/github_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,11 @@ func TestProcessRemoteAsset(t *testing.T) {
3030

3131
prev := os.Getenv(gacVar)
3232
defer t.Setenv(gacVar, prev)
33+
3334
t.Setenv(gacVar, "")
3435

3536
files := []string{}
37+
3638
defer func() {
3739
for _, f := range files {
3840
os.RemoveAll(f)

dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -386,7 +386,7 @@ dependencies:
386386

387387
# golangci-lint-version
388388
- name: "golangci-lint"
389-
version: v2.1
389+
version: v2.3
390390
refPaths:
391391
- path: .github/workflows/lint.yml
392392
match: "version: v\\d+.\\d+?\\.?(\\d+)?"

pkg/binary/binary_unit_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ import (
2727
func TestContainsString(t *testing.T) {
2828
tmpfile, err := os.CreateTemp(t.TempDir(), "")
2929
require.NoError(t, err)
30+
3031
defer os.Remove(tmpfile.Name())
3132

3233
// Decode a fragment of kubectl into a temporary file:

pkg/gcp/build/build.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -254,6 +254,7 @@ func RunSingleJob(o *Options, jobName, uploaded, version string, subs map[string
254254
}
255255

256256
defer f.Close()
257+
257258
cmd.AddWriter(f)
258259
}
259260

@@ -362,6 +363,7 @@ func RunBuildJobs(o *Options) []error {
362363
for k, v := range vs {
363364
go func(job string, vc map[string]string) {
364365
defer w.Done()
366+
365367
logrus.Infof("Starting job %q...", job)
366368

367369
if err := RunSingleJob(o, job, uploaded, tag, mergeMaps(extraSubs, vc)); err != nil {

pkg/notes/document/document_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ func setupTestDir(t *testing.T, dir string) {
279279

280280
func repoTagTarball(t *testing.T, path, repoTag string) {
281281
const manifestJSON = "manifest.json"
282+
282283
manifestJSONPath := filepath.Join(filepath.Dir(path), manifestJSON)
283284
require.NoError(t, os.WriteFile(
284285
manifestJSONPath,

pkg/notes/notes.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -653,6 +653,7 @@ type commitList struct {
653653
func (l *commitList) Add(c []*gogithub.RepositoryCommit) {
654654
l.Lock()
655655
defer l.Unlock()
656+
656657
l.list = append(l.list, c...)
657658
}
658659

@@ -917,6 +918,7 @@ type resultList struct {
917918
func (l *resultList) Add(r *Result) {
918919
l.Lock()
919920
defer l.Unlock()
921+
920922
l.list = append(l.list, r)
921923
}
922924

pkg/release/publish.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -465,6 +465,7 @@ func (p *Publisher) PublishReleaseNotesIndex(
465465
}
466466

467467
defer os.RemoveAll(tempDir)
468+
468469
tempIndexFile := filepath.Join(tempDir, releaseNotesIndex)
469470

470471
if err := p.client.CopyToLocal(

0 commit comments

Comments
 (0)