Skip to content

Commit 78186ac

Browse files
authored
Merge pull request #19 from infosiftr/validate-maintainers-equally
Force line-based files to have valid "Maintainers" too
2 parents dd7d405 + 3c21812 commit 78186ac

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

manifest/line-based.go

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,5 +80,12 @@ func ParseLineBased(readerIn io.Reader) (*Manifest2822, error) {
8080
}
8181
}
8282

83+
if len(manifest.Global.Maintainers) < 1 {
84+
return nil, fmt.Errorf("missing Maintainers")
85+
}
86+
if invalidMaintainers := manifest.Global.InvalidMaintainers(); len(invalidMaintainers) > 0 {
87+
return nil, fmt.Errorf("invalid Maintainers: %q (expected format %q)", strings.Join(invalidMaintainers, ", "), MaintainersFormat)
88+
}
89+
8390
return manifest, nil
8491
}

0 commit comments

Comments
 (0)