diff --git a/internal/chart/v3/lint/rules/template.go b/internal/chart/v3/lint/rules/template.go index 21658c5a3..408492584 100644 --- a/internal/chart/v3/lint/rules/template.go +++ b/internal/chart/v3/lint/rules/template.go @@ -123,13 +123,10 @@ func TemplatesWithSkipSchemaValidation(linter *support.Linter, values map[string fileName := template.Name fpath = fileName - // skip the linting rules if the file starts with _ and is not a yml/yaml file - if isHelperFile(fileName) { - continue + if !isHelperFile(fileName) { + linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) } - linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) - // We only apply the following lint rules to yaml files if filepath.Ext(fileName) != ".yaml" || filepath.Ext(fileName) == ".yml" { continue diff --git a/pkg/chart/v2/lint/rules/template.go b/pkg/chart/v2/lint/rules/template.go index 3f567136e..52167174a 100644 --- a/pkg/chart/v2/lint/rules/template.go +++ b/pkg/chart/v2/lint/rules/template.go @@ -123,13 +123,10 @@ func TemplatesWithSkipSchemaValidation(linter *support.Linter, values map[string fileName := template.Name fpath = fileName - // skip the linting rules if the file starts with _ and is not a yaml/yml file - if isHelperFile(fileName) { - continue + if !isHelperFile(fileName) { + linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) } - linter.RunLinterRule(support.ErrorSev, fpath, validateAllowedExtension(fileName)) - // We only apply the following lint rules to yaml files if filepath.Ext(fileName) != ".yaml" || filepath.Ext(fileName) == ".yml" { continue