|
|
|
@ -48,7 +48,6 @@ func Chartfile(linter *support.Linter) {
|
|
|
|
|
|
|
|
|
|
linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartNamePresence(chartFile))
|
|
|
|
|
linter.RunLinterRule(support.WarningSev, chartFileName, validateChartNameFormat(chartFile))
|
|
|
|
|
linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartNameDirMatch(linter.ChartDir, chartFile))
|
|
|
|
|
|
|
|
|
|
// Chart metadata
|
|
|
|
|
linter.RunLinterRule(support.ErrorSev, chartFileName, validateChartVersion(chartFile))
|
|
|
|
@ -89,13 +88,6 @@ func validateChartNameFormat(cf *chart.Metadata) error {
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func validateChartNameDirMatch(chartDir string, cf *chart.Metadata) error {
|
|
|
|
|
if cf.Name != filepath.Base(chartDir) {
|
|
|
|
|
return fmt.Errorf("directory name (%s) and chart name (%s) must be the same", filepath.Base(chartDir), cf.Name)
|
|
|
|
|
}
|
|
|
|
|
return nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func validateChartVersion(cf *chart.Metadata) error {
|
|
|
|
|
if cf.Version == "" {
|
|
|
|
|
return errors.New("version is required")
|
|
|
|
|