From ec1a009deed5d148385ae697a4fc7153085894a7 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 2 Jul 2020 14:34:28 +0200 Subject: [PATCH] rbd: allow DeleteVolume() to be too complex according to gocyclo By fixing the golangci-lint runs, this now gets reported as a problem. Instead of addressing the compexity of the DeleteVolume() method here, mark it as a TODO. Signed-off-by: Niels de Vos --- internal/rbd/controllerserver.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/internal/rbd/controllerserver.go b/internal/rbd/controllerserver.go index 6c3edcede..1bc5d3f9c 100644 --- a/internal/rbd/controllerserver.go +++ b/internal/rbd/controllerserver.go @@ -465,6 +465,8 @@ func (cs *ControllerServer) DeleteLegacyVolume(ctx context.Context, req *csi.Del // DeleteVolume deletes the volume in backend and removes the volume metadata // from store +// TODO: make this function less complex +// nolint:gocyclo // golangci-lint did not catch this earlier, needs to get fixed later func (cs *ControllerServer) DeleteVolume(ctx context.Context, req *csi.DeleteVolumeRequest) (*csi.DeleteVolumeResponse, error) { if err := cs.Driver.ValidateControllerServiceRequest(csi.ControllerServiceCapability_RPC_CREATE_DELETE_VOLUME); err != nil { klog.Errorf(util.Log(ctx, "invalid delete volume req: %v"), protosanitizer.StripSecrets(req))