portainer/portainer

View on GitHub
api/http/handler/helm/handler.go

Summary

Maintainability
A
1 hr
Test Coverage

Function NewHandler has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

func NewHandler(bouncer security.BouncerService, dataStore dataservices.DataStore, jwtService portainer.JWTService, kubernetesDeployer portainer.KubernetesDeployer, helmPackageManager libhelm.HelmPackageManager, kubeClusterAccessService kubernetes.KubeClusterAccessService) *Handler {
Severity: Minor
Found in api/http/handler/helm/handler.go - About 45 mins to fix

    Method Handler.getHelmClusterAccess has 5 return statements (exceeds 4 allowed).
    Open

    func (handler *Handler) getHelmClusterAccess(r *http.Request) (*options.KubernetesClusterAccess, *httperror.HandlerError) {
        endpoint, err := middlewares.FetchEndpoint(r)
        if err != nil {
            return nil, httperror.NotFound("Unable to find an environment on request context", err)
        }
    Severity: Major
    Found in api/http/handler/helm/handler.go - About 35 mins to fix

      There are no issues that match your filters.

      Category
      Status