Skip to content

Commit fc21655

Browse files
committed
add policy spec validation errors back
Signed-off-by: Sylwester Piskozub <sylwesterpiskozub@gmail.com>
1 parent 8358b8a commit fc21655

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

  • app/cli/internal/policydevel

app/cli/internal/policydevel/lint.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ func (p *PolicyToLint) loadReferencedRegoFiles(baseDir string) error {
128128
for _, yamlFile := range p.YAMLFiles {
129129
var parsed v1.Policy
130130
if err := unmarshal.FromRaw(yamlFile.Content, unmarshal.RawFormatYAML, &parsed, true); err != nil {
131-
// Ignore parse errors here; they'll be caught in validation
131+
p.AddError(yamlFile.Path, err.Error(), 0)
132132
continue
133133
}
134134
for _, spec := range parsed.Spec.Policies {

0 commit comments

Comments
 (0)