From eea2d4577bf08d5cac2bf8f054439db01e0cf97d Mon Sep 17 00:00:00 2001 From: Zach Burgess Date: Mon, 7 Jul 2025 20:31:41 -0700 Subject: [PATCH] Raise an error if the `templates/` dir is not valid and return early. Signed-off-by: Zach Burgess --- pkg/lint/rules/template.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go index 55bc0ec89..06a5a2994 100644 --- a/pkg/lint/rules/template.go +++ b/pkg/lint/rules/template.go @@ -59,7 +59,10 @@ func TemplatesWithSkipSchemaValidation(linter *support.Linter, values map[string return } - linter.RunLinterRule(support.WarningSev, fpath, validateTemplatesDir(templatesPath)) + validTemplatesDir := linter.RunLinterRule(support.ErrorSev, fpath, validateTemplatesDir(templatesPath)) + if !validTemplatesDir { + return + } // Load chart and parse templates chart, err := loader.Load(linter.ChartDir)