From f736af95eb94950acc5871a8451fa4a4bdc37697 Mon Sep 17 00:00:00 2001 From: Christophe VILA Date: Fri, 16 Oct 2020 22:23:18 +0200 Subject: [PATCH] do not check YAML if nothing was parsed Signed-off-by: Christophe VILA --- pkg/lint/rules/template.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkg/lint/rules/template.go b/pkg/lint/rules/template.go index 5de0819c4..3e4e0ebd1 100644 --- a/pkg/lint/rules/template.go +++ b/pkg/lint/rules/template.go @@ -122,6 +122,9 @@ func Templates(linter *support.Linter, values map[string]interface{}, namespace // key will be raised as well err := yaml.Unmarshal([]byte(renderedContent), &yamlStruct) + if (K8sYamlStruct{}) == yamlStruct { + continue + } // If YAML linting fails, we sill progress. So we don't capture the returned state // on this linter run. linter.RunLinterRule(support.ErrorSev, fpath, validateYamlContent(err))