cloudfoundry/cf-k8s-controllers

View on GitHub

Showing 22 of 26 total issues

Function NewRoute has 6 arguments (exceeds 5 allowed). Consider refactoring.
Open

    serverURL url.URL,
    routeRepo CFRouteRepository,
    domainRepo CFDomainRepository,
    appRepo CFAppRepository,
    spaceRepo CFSpaceRepository,
Severity: Minor
Found in api/handlers/route.go - About 35 mins to fix

    Method CFRouteValidator.ValidateUpdate has 9 return statements (exceeds 8 allowed).
    Open

    func (v *CFRouteValidator) ValidateUpdate(ctx context.Context, oldObj, obj runtime.Object) (admission.Warnings, error) {
        route, ok := obj.(*korifiv1alpha1.CFRoute)
        if !ok {
            return nil, apierrors.NewBadRequest(fmt.Sprintf("expected a CFRoute but got a %T", obj))
        }
    Severity: Major
    Found in controllers/webhooks/networking/cfroute_validator.go - About 35 mins to fix
      Severity
      Category
      Status
      Source
      Language