Skip to content

Commit dbd6c08

Browse files
committed
Enable staticcheck linter with SA1019 to find deprecated methods
SA1019 - Using a deprecated function, variable, constant or field See https://staticcheck.dev/docs/checks/#SA1019
1 parent 06bb4c9 commit dbd6c08

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

.golangci.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ linters:
2121
- prealloc
2222
- predeclared
2323
- promlinter
24+
- staticcheck
2425
- tagliatelle
2526
- typecheck
2627
- unused
@@ -66,7 +67,6 @@ linters:
6667
# - rowserrcheck
6768
# - scopelint
6869
# - sqlclosecheck
69-
# - staticcheck
7070
# - stylecheck
7171
# - testpackage
7272
# - thelper
@@ -77,6 +77,8 @@ linters:
7777
# - wrapcheck
7878
# - wsl
7979
linters-settings:
80+
staticcheck:
81+
checks: ["SA1019"]
8082
gocritic:
8183
enabled-checks:
8284
# Diagnostic

cmd/crictl/util.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ import (
3131
"sync"
3232
"time"
3333

34-
"github.com/golang/protobuf/jsonpb"
35-
"github.com/golang/protobuf/proto"
34+
"github.com/golang/protobuf/jsonpb" //nolint:staticcheck
35+
"github.com/golang/protobuf/proto" //nolint:staticcheck
3636
utilyaml "k8s.io/apimachinery/pkg/util/yaml"
3737
cri "k8s.io/cri-api/pkg/apis"
3838
internalapi "k8s.io/cri-api/pkg/apis"

0 commit comments

Comments
 (0)