anexia/csi-driver

View on GitHub
pkg/controller/utils.go

Summary

Maintainability
A
1 hr
Test Coverage
B
87%

Showing 2 of 2 total issues

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

      There are no issues that match your filters.

      Category
      Status