Force line-based files to have valid "Maintainers" too
This copies the exact `mainfest.Global.Maintainers` validation from `rfc2822.go`.
This commit is contained in:
parent
dd7d405dfe
commit
3c2181232e
|
|
@ -80,5 +80,12 @@ func ParseLineBased(readerIn io.Reader) (*Manifest2822, error) {
|
|||
}
|
||||
}
|
||||
|
||||
if len(manifest.Global.Maintainers) < 1 {
|
||||
return nil, fmt.Errorf("missing Maintainers")
|
||||
}
|
||||
if invalidMaintainers := manifest.Global.InvalidMaintainers(); len(invalidMaintainers) > 0 {
|
||||
return nil, fmt.Errorf("invalid Maintainers: %q (expected format %q)", strings.Join(invalidMaintainers, ", "), MaintainersFormat)
|
||||
}
|
||||
|
||||
return manifest, nil
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue