do not check YAML if nothing was parsed

Signed-off-by: Christophe VILA <christophe.vila@thalesgroup.com>
pull/8913/head
Christophe VILA 4 years ago
parent e72e2935dd
commit f736af95eb

@ -122,6 +122,9 @@ func Templates(linter *support.Linter, values map[string]interface{}, namespace
// key will be raised as well // key will be raised as well
err := yaml.Unmarshal([]byte(renderedContent), &yamlStruct) 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 // If YAML linting fails, we sill progress. So we don't capture the returned state
// on this linter run. // on this linter run.
linter.RunLinterRule(support.ErrorSev, fpath, validateYamlContent(err)) linter.RunLinterRule(support.ErrorSev, fpath, validateYamlContent(err))

Loading…
Cancel
Save