Skip to content

Commit 0291c50

Browse files
yoheiuedaQi Feng Huo
authored and
Qi Feng Huo
committed
golang: Ignore deprecated error for protobuf v1
Protobuf code of the CSI API still uses protobuf v1, so we need to use the deprecated github.com/golang/protobuf/jsonpb package. Signed-off-by: Yohei Ueda <[email protected]>
1 parent 9c557ee commit 0291c50

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.golangci.yaml

+7-1
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ issues:
270270
- 'declaration of "(err|ctx)" shadows declaration at'
271271

272272
# Excluding configuration per-path, per-linter, per-text and per-source
273-
#exclude-rules:
273+
exclude-rules:
274274
# Exclude some linters from running on tests files.
275275
#- path: _test\.go
276276
# linters:
@@ -296,6 +296,12 @@ issues:
296296
# - lll
297297
# source: "^//go:generate "
298298

299+
# "github.com/container-storage-interface/spec/lib/go/csi" still uses
300+
# "github.com/golang/protobuf", which is the deprecated protobuf V1.
301+
- path: ^volumes/csi-wrapper/pkg/wrapper/
302+
linters: [staticcheck]
303+
text: 'SA1019: "github.com/golang/protobuf/jsonpb" is deprecated: Use the "google.golang.org/protobuf/encoding/protojson" package instead.'
304+
299305
# Independently of option `exclude` we use default exclude patterns,
300306
# it can be disabled by this option.
301307
# To list all excluded by default patterns execute `golangci-lint run --help`.

0 commit comments

Comments
 (0)