anexia/csi-driver

View on GitHub

Showing 5 of 5 total issues

Function Run has 6 return statements (exceeds 4 allowed).
Open

func Run(ctx context.Context, components types.Components, nodeID, endpoint string) error {
opts := server.Options{
Endpoint: endpoint,
NodeID: nodeID,
}
Severity: Major
Found in pkg/driver/driver.go - About 40 mins to fix

    Method node.NodePublishVolume has 6 return statements (exceeds 4 allowed).
    Open

    func (ns node) NodePublishVolume(ctx context.Context, req *csi.NodePublishVolumeRequest) (*csi.NodePublishVolumeResponse, error) {
    if err := checkNodePublishVolumeRequest(req); err != nil {
    return nil, status.Errorf(codes.InvalidArgument, "invalid NodePublishVolumeRequest: %s", err)
    }
     
     
    Severity: Major
    Found in pkg/node/node.go - About 40 mins to fix

      Function checkCreateVolumeRequest has 5 return statements (exceeds 4 allowed).
      Open

      func checkCreateVolumeRequest(req *csi.CreateVolumeRequest) error {
      if req.Name == "" {
      return ErrNameNotProvided
      }
       
       
      Severity: Major
      Found in pkg/controller/utils.go - About 35 mins to fix

        Function findVolumeByName has 5 return statements (exceeds 4 allowed).
        Open

        func findVolumeByName(ctx context.Context, engine types.API, name string) (*dynamicvolumev1.Volume, error) {
        var channel types.ObjectChannel
        if err := engine.List(ctx, &dynamicvolumev1.Volume{Name: name}, api.ObjectChannel(&channel)); err != nil {
        return nil, fmt.Errorf("failed listing volumes: %s", err)
        }
        Severity: Major
        Found in pkg/controller/utils.go - About 35 mins to fix

          Function checkNodePublishVolumeRequest has 5 return statements (exceeds 4 allowed).
          Open

          func checkNodePublishVolumeRequest(req *csi.NodePublishVolumeRequest) error {
          if req.VolumeId == "" {
          return ErrVolumeIDNotProvided
          }
           
           
          Severity: Major
          Found in pkg/node/utils.go - About 35 mins to fix
            Severity
            Category
            Status
            Source
            Language