diff --git a/e2e/staticpvc.go b/e2e/staticpvc.go index 5931f1ed3..33eafc887 100644 --- a/e2e/staticpvc.go +++ b/e2e/staticpvc.go @@ -188,7 +188,7 @@ func validateRBDStaticPV(f *framework.Framework, appPath string, isBlock, checkI return err } -// nolint:gocyclo // reduce complexity +// nolint:gocyclo,cyclop // reduce complexity func validateCephFsStaticPV(f *framework.Framework, appPath, scPath string) error { opt := make(map[string]string) var ( diff --git a/e2e/utils.go b/e2e/utils.go index 9327af035..ff1c4c4f8 100644 --- a/e2e/utils.go +++ b/e2e/utils.go @@ -527,7 +527,7 @@ func writeDataAndCalChecksum(app *v1.Pod, opt *metav1.ListOptions, f *framework. return checkSum, nil } -// nolint:gocyclo,gocognit,nestif // reduce complexity +// nolint:gocyclo,gocognit,nestif,cyclop // reduce complexity func validatePVCClone( totalCount int, sourcePvcPath, sourceAppPath, clonePvcPath, clonePvcAppPath string, @@ -728,7 +728,7 @@ func validatePVCClone( validateRBDImageCount(f, 0, defaultRBDPool) } -// nolint:gocyclo,gocognit,nestif // reduce complexity +// nolint:gocyclo,gocognit,nestif,cyclop // reduce complexity func validatePVCSnapshot( totalCount int, pvcPath, appPath, snapshotPath, pvcClonePath, appClonePath string, diff --git a/internal/cephfs/controllerserver.go b/internal/cephfs/controllerserver.go index e2f9a8478..4a4277c3e 100644 --- a/internal/cephfs/controllerserver.go +++ b/internal/cephfs/controllerserver.go @@ -145,7 +145,7 @@ func checkContentSource( } // CreateVolume creates a reservation and the volume in backend, if it is not already present. -// nolint:gocognit,gocyclo,nestif // TODO: reduce complexity +// nolint:gocognit,gocyclo,nestif,cyclop // TODO: reduce complexity func (cs *ControllerServer) CreateVolume( ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { @@ -508,7 +508,7 @@ func (cs *ControllerServer) ControllerExpandVolume( // CreateSnapshot creates the snapshot in backend and stores metadata // in store -// nolint:gocyclo // golangci-lint did not catch this earlier, needs to get fixed late +// nolint:gocyclo,cyclop // golangci-lint did not catch this earlier, needs to get fixed late func (cs *ControllerServer) CreateSnapshot( ctx context.Context, req *csi.CreateSnapshotRequest) (*csi.CreateSnapshotResponse, error) { diff --git a/internal/cephfs/fsjournal.go b/internal/cephfs/fsjournal.go index ebc4b0f50..9ee2e0c44 100644 --- a/internal/cephfs/fsjournal.go +++ b/internal/cephfs/fsjournal.go @@ -55,7 +55,7 @@ because, the order of omap creation and deletion are inverse of each other, and request name lock, and hence any stale omaps are leftovers from incomplete transactions and are hence safe to garbage collect. */ -// nolint:gocognit,gocyclo,nestif // TODO: reduce complexity +// nolint:gocognit,gocyclo,nestif,cyclop // TODO: reduce complexity func checkVolExists(ctx context.Context, volOptions, parentVolOpt *volumeOptions, diff --git a/internal/util/vault.go b/internal/util/vault.go index 6393c6b98..8fb004666 100644 --- a/internal/util/vault.go +++ b/internal/util/vault.go @@ -113,7 +113,7 @@ func setConfigString(option *string, config map[string]interface{}, key string) // these settings will be used when connecting to the Vault service with // vc.connectVault(). // -// nolint:gocyclo // iterating through many config options, not complex at all. +// nolint:gocyclo,cyclop // iterating through many config options, not complex at all. func (vc *vaultConnection) initConnection(config map[string]interface{}) error { vaultConfig := make(map[string]interface{}) keyContext := make(map[string]string) diff --git a/internal/util/vault_tokens.go b/internal/util/vault_tokens.go index ce33fb189..2f4828dd8 100644 --- a/internal/util/vault_tokens.go +++ b/internal/util/vault_tokens.go @@ -339,7 +339,7 @@ func (kms *VaultTokensKMS) setTokenName(config map[string]interface{}) error { // initCertificates updates the kms.vaultConfig with the options from config // it calls the kubernetes secrets and get the required data. -// nolint:gocyclo // iterating through many config options, not complex at all. +// nolint:gocyclo,cyclop // iterating through many config options, not complex at all. func (vtc *vaultTenantConnection) initCertificates(config map[string]interface{}) error { vaultConfig := make(map[string]interface{})