vorteil/direktiv

View on GitHub
pkg/service/helper.go

Summary

Maintainability
B
5 hrs
Test Coverage

Function buildEnvVars has 60 lines of code (exceeds 50 allowed). Consider refactoring.
Open

func buildEnvVars(forSidecar bool, c *core.Config, sv *core.ServiceFileData) []corev1.EnvVar {
    proxyEnvs := []corev1.EnvVar{}

    if len(c.KnativeProxyHTTP) > 0 {
        proxyEnvs = append(proxyEnvs, corev1.EnvVar{
Severity: Minor
Found in pkg/service/helper.go - About 1 hr to fix

    Function buildContainers has 59 lines of code (exceeds 50 allowed). Consider refactoring.
    Open

    func buildContainers(c *core.Config, sv *core.ServiceFileData) ([]corev1.Container, error) {
        // set resource limits.
        rl, err := buildResourceLimits(c, sv)
        if err != nil {
            return nil, err
    Severity: Minor
    Found in pkg/service/helper.go - About 1 hr to fix

      Function buildService has 57 lines of code (exceeds 50 allowed). Consider refactoring.
      Open

      func buildService(c *core.Config, sv *core.ServiceFileData, registrySecrets []corev1.LocalObjectReference) (*servingv1.Service, error) {
          containers, err := buildContainers(c, sv)
          if err != nil {
              return nil, err
          }
      Severity: Minor
      Found in pkg/service/helper.go - About 1 hr to fix

        Function buildResourceLimits has 53 lines of code (exceeds 50 allowed). Consider refactoring.
        Open

        func buildResourceLimits(cf *core.Config, sv *core.ServiceFileData) (*corev1.ResourceRequirements, error) {
            var (
                m int
                c string
                d int
        Severity: Minor
        Found in pkg/service/helper.go - About 1 hr to fix

          There are no issues that match your filters.

          Category
          Status