Validate canonical comparison manifests
This commit is contained in:
@@ -283,7 +283,11 @@ func (manifest Manifest) Validate() error {
|
||||
if result.ValidationStatus != "passed" {
|
||||
return fmt.Errorf("successful result %d did not pass validation", result.Position)
|
||||
}
|
||||
if result.Error != nil || !isReportPath(result.ReportPath) {
|
||||
expectedPath, err := ReportFilename(result.Position, manifest.Total, result.ProfileID)
|
||||
if err != nil {
|
||||
return fmt.Errorf("successful result %d has invalid report identity: %w", result.Position, err)
|
||||
}
|
||||
if result.Error != nil || result.ReportPath != expectedPath {
|
||||
return fmt.Errorf("successful result %d has invalid report details", result.Position)
|
||||
}
|
||||
if _, duplicate := reportPaths[result.ReportPath]; duplicate {
|
||||
|
||||
Reference in New Issue
Block a user