mirror of
https://github.com/gocsaf/csaf.git
synced 2025-12-22 11:55:40 +01:00
Move PMD error from logs to report.
This commit is contained in:
parent
d09db6635d
commit
5d37dd1339
1 changed files with 8 additions and 3 deletions
|
|
@ -251,11 +251,16 @@ func (p *processor) run(domains []string) (*Report, error) {
|
||||||
p.reset()
|
p.reset()
|
||||||
|
|
||||||
if !p.checkProviderMetadata(d) {
|
if !p.checkProviderMetadata(d) {
|
||||||
// We cannot build a report if the provider metadata cannot be parsed.
|
// We need to fail the domain if the PMD cannot be parsed.
|
||||||
log.Printf("Could not parse the Provider-Metadata.json of: %s\n", d)
|
p.badProviderMetadata.use()
|
||||||
|
message := fmt.Sprintf("Could not parse the Provider-Metadata.json of: %s", d)
|
||||||
|
p.badProviderMetadata.error(message)
|
||||||
|
|
||||||
}
|
}
|
||||||
if err := p.checkDomain(d); err != nil {
|
if err := p.checkDomain(d); err != nil {
|
||||||
log.Printf("Failed to find valid provider-metadata.json for domain %s: %v. ", d, err)
|
p.badProviderMetadata.use()
|
||||||
|
message := fmt.Sprintf("Failed to find valid provider-metadata.json for domain %s: %v. ", d, err)
|
||||||
|
p.badProviderMetadata.error(message)
|
||||||
}
|
}
|
||||||
domain := &Domain{Name: d}
|
domain := &Domain{Name: d}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue