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 <rar@redhat.com>
This commit is contained in:
Rakshith R
2021-04-08 16:59:12 +05:30
committed by mergify[bot]
parent 3f3489367c
commit 10d539efc8
2 changed files with 2 additions and 3 deletions

View File

@ -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)