fix: Add new public func to ensure backwards compatibility

Signed-off-by: Enin Kaduk <eninkadukk@gmail.com>
pull/13076/head
Enin Kaduk 1 year ago
parent 6985f6f4ea
commit 4ad7b06ba7

@ -126,5 +126,5 @@ func lintChart(path string, vals map[string]interface{}, namespace string, kubeV
return linter, errors.Wrap(err, "unable to check Chart.yaml file in chart") return linter, errors.Wrap(err, "unable to check Chart.yaml file in chart")
} }
return lint.AllWithKubeVersion(chartPath, vals, namespace, kubeVersion, quiet), nil return lint.AllWithKubeVersionAndQuiet(chartPath, vals, namespace, kubeVersion, quiet), nil
} }

@ -25,12 +25,17 @@ import (
) )
// All runs all of the available linters on the given base directory. // All runs all of the available linters on the given base directory.
func All(basedir string, values map[string]interface{}, namespace string, quiet bool) support.Linter { func All(basedir string, values map[string]interface{}, namespace string, _ bool) support.Linter {
return AllWithKubeVersion(basedir, values, namespace, nil, quiet) return AllWithKubeVersion(basedir, values, namespace, nil)
} }
// AllWithKubeVersion runs all the available linters on the given base directory, allowing to specify the kubernetes version. // AllWithKubeVersion runs all the available linters on the given base directory, allowing to specify the kubernetes version.
func AllWithKubeVersion(basedir string, values map[string]interface{}, namespace string, kubeVersion *chartutil.KubeVersion, quiet bool) support.Linter { func AllWithKubeVersion(basedir string, values map[string]interface{}, namespace string, kubeVersion *chartutil.KubeVersion) support.Linter {
return AllWithKubeVersionAndQuiet(basedir, values, namespace, kubeVersion, false)
}
// AllWithKubeVersionAndQuiet allows the quiet flag to be passed to the linter
func AllWithKubeVersionAndQuiet(basedir string, values map[string]interface{}, namespace string, kubeVersion *chartutil.KubeVersion, quiet bool) support.Linter {
// Using abs path to get directory context // Using abs path to get directory context
chartDir, _ := filepath.Abs(basedir) chartDir, _ := filepath.Abs(basedir)

Loading…
Cancel
Save