mirror of
https://github.com/ceph/ceph-csi.git
synced 2024-11-22 14:20:19 +00:00
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:
parent
3f3489367c
commit
10d539efc8
@ -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.
|
// 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) {
|
func (cs *ControllerServer) CreateVolume(ctx context.Context, req *csi.CreateVolumeRequest) (*csi.CreateVolumeResponse, error) {
|
||||||
if err := cs.validateCreateVolumeRequest(req); err != nil {
|
if err := cs.validateCreateVolumeRequest(req); err != nil {
|
||||||
util.ErrorLog(ctx, "CreateVolumeRequest validation failed: %v", err)
|
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
|
// All errors other than ErrVolumeNotFound should return an error back to the caller
|
||||||
if !errors.Is(purgeErr, ErrVolumeNotFound) {
|
if !errors.Is(purgeErr, ErrVolumeNotFound) {
|
||||||
return nil, status.Error(codes.Internal, purgeErr.Error())
|
return nil, status.Error(codes.Internal, purgeErr.Error())
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
errUndo := undoVolReservation(ctx, volOptions, *vID, secret)
|
errUndo := undoVolReservation(ctx, volOptions, *vID, secret)
|
||||||
|
@ -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
|
request name lock, and hence any stale omaps are leftovers from incomplete transactions and are
|
||||||
hence safe to garbage collect.
|
hence safe to garbage collect.
|
||||||
*/
|
*/
|
||||||
// nolint:gocognit:gocyclo // TODO: reduce complexity
|
// nolint:gocognit,gocyclo,nestif // TODO: reduce complexity
|
||||||
func checkVolExists(ctx context.Context,
|
func checkVolExists(ctx context.Context,
|
||||||
volOptions,
|
volOptions,
|
||||||
parentVolOpt *volumeOptions,
|
parentVolOpt *volumeOptions,
|
||||||
|
Loading…
Reference in New Issue
Block a user