You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
What happened?
Govet verification fails with possible nil pointer issue
madhankumar@MADHANKUMARs-MacBook-Pro ibm-powervs-block-csi-driver % make verify
echo "Installing golangci-lint..."
Installing golangci-lint...
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s v1.43.0
golangci/golangci-lint info checking GitHub for tag 'v1.43.0'
golangci/golangci-lint info found version: 1.43.0 for v1.43.0/darwin/amd64
golangci/golangci-lint info installed ./bin/golangci-lint
### verify-vendor:
Repo uses 'go mod'.
+ env GO111MODULE=on go mod tidy
Go dependencies up-to-date.
echo "verifying and linting files ..."
verifying and linting files ...
./hack/verify-all
Verifying gofmt
No issue found
Verifying govet
Done
pkg/driver/node.go:386:62: SA5011: possible nil pointer dereference (staticcheck)
klog.V(4).Infof("NodeGetVolumeStats: called with args %+v", *req)
^
pkg/driver/node.go:389:5: SA5011(related information): this check suggests that the pointer can be nil (staticcheck)
if req == nil || req.VolumeId == "" {
^
make: *** [verify] Error 1
madhankumar@MADHANKUMARs-MacBook-Pro ibm-powervs-block-csi-driver %
What you expected to happen?
Don't have to check if req is nil as its passed from provisioner and will not be nil.
How to reproduce it (as minimally and precisely as possible)?
Run make verify on the repo.
The text was updated successfully, but these errors were encountered:
/kind bug
What happened?
Govet verification fails with possible nil pointer issue
What you expected to happen?
Don't have to check if req is nil as its passed from provisioner and will not be nil.
How to reproduce it (as minimally and precisely as possible)?
Run
make verify
on the repo.The text was updated successfully, but these errors were encountered: