arttor/helmify

View on GitHub
pkg/helm/chart.go

Summary

Maintainability
A
2 hrs
Test Coverage

Method output.Create has 6 arguments (exceeds 4 allowed). Consider refactoring.
Open

func (o output) Create(chartDir, chartName string, crd bool, certManagerAsSubchart bool, certManagerVersion string, templates []helmify.Template, filenames []string) error {
Severity: Minor
Found in pkg/helm/chart.go - About 45 mins to fix

    Method output.Create has 5 return statements (exceeds 4 allowed).
    Open

    func (o output) Create(chartDir, chartName string, crd bool, certManagerAsSubchart bool, certManagerVersion string, templates []helmify.Template, filenames []string) error {
        err := initChartDir(chartDir, chartName, crd, certManagerAsSubchart, certManagerVersion)
        if err != nil {
            return err
        }
    Severity: Major
    Found in pkg/helm/chart.go - About 35 mins to fix

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

      func overwriteTemplateFile(filename, chartDir string, crd bool, templates []helmify.Template) error {
          // pull in crd-dir setting and siphon crds into folder
          var subdir string
          if strings.Contains(filename, "crd") && crd {
              subdir = "crds"
      Severity: Major
      Found in pkg/helm/chart.go - About 35 mins to fix

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

        func overwriteValuesFile(chartDir string, values helmify.Values, certManagerAsSubchart bool) error {
            if certManagerAsSubchart {
                _, err := values.Add(true, "certmanager", "installCRDs")
                if err != nil {
                    return fmt.Errorf("%w: unable to add cert-manager.installCRDs", err)
        Severity: Major
        Found in pkg/helm/chart.go - About 35 mins to fix

          There are no issues that match your filters.

          Category
          Status