diff --git a/.github/workflows/static.yaml b/.github/workflows/static.yaml index 77a1d4125..7881ef069 100644 --- a/.github/workflows/static.yaml +++ b/.github/workflows/static.yaml @@ -16,4 +16,4 @@ jobs: uses: golangci/golangci-lint-action@v6 with: version: v1.64 - args: -E=gofmt,unused,ineffassign,revive,misspell,exportloopref,asciicheck,bodyclose,contextcheck,depguard,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s + args: -E=gofmt,unused,ineffassign,revive,misspell,copyloopvar,asciicheck,bodyclose,contextcheck,dogsled,durationcheck,errname,forbidigo -D=staticcheck --timeout=30m0s diff --git a/pkg/csi-common/utils.go b/pkg/csi-common/utils.go index e9c86c2ca..a82333efd 100644 --- a/pkg/csi-common/utils.go +++ b/pkg/csi-common/utils.go @@ -42,21 +42,21 @@ func NewVolumeCapabilityAccessMode(mode csi.VolumeCapability_AccessMode_Mode) *c return &csi.VolumeCapability_AccessMode{Mode: mode} } -func NewControllerServiceCapability(cap csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability { +func NewControllerServiceCapability(c csi.ControllerServiceCapability_RPC_Type) *csi.ControllerServiceCapability { return &csi.ControllerServiceCapability{ Type: &csi.ControllerServiceCapability_Rpc{ Rpc: &csi.ControllerServiceCapability_RPC{ - Type: cap, + Type: c, }, }, } } -func NewNodeServiceCapability(cap csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability { +func NewNodeServiceCapability(c csi.NodeServiceCapability_RPC_Type) *csi.NodeServiceCapability { return &csi.NodeServiceCapability{ Type: &csi.NodeServiceCapability_Rpc{ Rpc: &csi.NodeServiceCapability_RPC{ - Type: cap, + Type: c, }, }, } diff --git a/pkg/smb/controllerserver_test.go b/pkg/smb/controllerserver_test.go index f11c55853..64af250ef 100644 --- a/pkg/smb/controllerserver_test.go +++ b/pkg/smb/controllerserver_test.go @@ -181,7 +181,6 @@ func TestCreateVolume(t *testing.T) { } for _, test := range cases { - test := test //pin t.Run(test.name, func(t *testing.T) { if test.skipOnWindows && runtime.GOOS == "windows" { return @@ -265,7 +264,6 @@ func TestDeleteVolume(t *testing.T) { }, } for _, test := range cases { - test := test //pin t.Run(test.desc, func(t *testing.T) { // Setup _ = os.MkdirAll(filepath.Join(d.workingMountDir, testCSIVolume), os.ModePerm) @@ -562,7 +560,6 @@ func TestGetSmbVolFromID(t *testing.T) { }, } for _, test := range cases { - test := test //pin t.Run(test.desc, func(t *testing.T) { smbVolume, err := getSmbVolFromID(test.volumeID)