Skip to content

Commit 4dd5ca7

Browse files
author
Kazuyoshi Kato
committed
script: update golangci-lint from v1.38.0 and v1.36.0 to v1.42.0
golint has been deprecated and replaced by revive since v1.41.0. Signed-off-by: Kazuyoshi Kato <[email protected]>
1 parent a5eccab commit 4dd5ca7

6 files changed

Lines changed: 6 additions & 6 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
- uses: actions/checkout@v2
3232
- uses: golangci/golangci-lint-action@v2
3333
with:
34-
version: v1.36.0
34+
version: v1.42.0
3535
args: --timeout=5m
3636
skip-go-installation: true
3737

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ linters:
66
- unconvert
77
- gofmt
88
- goimports
9-
- golint
9+
- revive
1010
- ineffassign
1111
- vet
1212
- unused

pkg/cri/server/sandbox_run.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ func (c *criService) RunPodSandbox(ctx context.Context, r *runtime.RunPodSandbox
121121
// handle. NetNSPath in sandbox metadata and NetNS is non empty only for non host network
122122
// namespaces. If the pod is in host network namespace then both are empty and should not
123123
// be used.
124-
var netnsMountDir string = "/var/run/netns"
124+
var netnsMountDir = "/var/run/netns"
125125
if c.config.NetNSMountsUnderStateDir {
126126
netnsMountDir = filepath.Join(c.config.StateDir, "netns")
127127
}

pkg/os/os_windows.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ func openPath(path string) (windows.Handle, error) {
5858
}
5959

6060
// GetFinalPathNameByHandle flags.
61-
//nolint:golint
61+
//nolint:revive // SNAKE_CASE is not idiomatic in Go, but aligned with Win32 API.
6262
const (
6363
cFILE_NAME_OPENED = 0x8
6464

script/setup/install-dev-tools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,4 @@ GO111MODULE=off go get -d github.com/gogo/googleapis || true
3434
GO111MODULE=off go get -d github.com/gogo/protobuf || true
3535

3636
GO111MODULE=on go get github.com/cpuguy83/go-md2man/[email protected]
37-
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.38.0
37+
GO111MODULE=on go get github.com/golangci/golangci-lint/cmd/golangci-lint@v1.42.0

snapshots/testsuite/testsuite.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ package testsuite
1818

1919
import (
2020
"context"
21-
//nolint:golint
21+
//nolint:revive // go-digest needs the blank import. See https://github.com/opencontainers/go-digest#usage.
2222
_ "crypto/sha256"
2323
"fmt"
2424
"io/ioutil"

0 commit comments

Comments
 (0)