From 10d539efc855deb437c479ff0ea09781c3b4529c Mon Sep 17 00:00:00 2001 From: Rakshith R Date: Thu, 8 Apr 2021 16:59:12 +0530 Subject: [PATCH] cleanup: correct nolint directive listing format nolint directive needs to be followed by comma separated list of linters. This commit changes to gocognit:gocyclo which was not recognised to linters which show error for the function. Signed-off-by: Rakshith R --- internal/cephfs/controllerserver.go | 3 +-- internal/cephfs/fsjournal.go | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/cephfs/controllerserver.go b/internal/cephfs/controllerserver.go index c8181ba7a..525493bf5 100644 --- a/internal/cephfs/controllerserver.go +++ b/internal/cephfs/controllerserver.go @@ -125,7 +125,7 @@ func checkContentSource(ctx context.Context, req *csi.CreateVolumeRequest, cr *u } // CreateVolume creates a reservation and the volume in backend, if it is not already present. -// nolint:gocognit:gocyclo // TODO: reduce complexity +// nolint:gocognit,gocyclo,nestif // TODO: reduce complexity func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) { if err := cs.validateCreateVolumeRequest(req); err != nil { util.ErrorLog(ctx, "CreateVolumeRequest validation failed: %v", err) @@ -193,7 +193,6 @@ func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVol // All errors other than ErrVolumeNotFound should return an error back to the caller if !errors.Is(purgeErr, ErrVolumeNotFound) { return nil, status.Error(codes.Internal, purgeErr.Error()) - } } errUndo := undoVolReservation(ctx, volOptions, *vID, secret) diff --git a/internal/cephfs/fsjournal.go b/internal/cephfs/fsjournal.go index 1e06c225d..5c567d056 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 // TODO: reduce complexity +// nolint:gocognit,gocyclo,nestif // TODO: reduce complexity func checkVolExists(ctx context.Context, volOptions, parentVolOpt *volumeOptions,