Improved Logging
This commit is contained in:
@@ -949,7 +949,11 @@ func setModuleHAKList(document *gff.Document, hakNames []string) {
|
||||
func validateForBuild(p *project.Project) error {
|
||||
report := validator.ValidateProject(p)
|
||||
if report.HasErrors() {
|
||||
return fmt.Errorf("validation failed with %d error(s)", len(report.Diagnostics))
|
||||
summary := report.SummaryLines(3)
|
||||
if len(summary) > 0 {
|
||||
return fmt.Errorf("validation failed with %d error(s): %s", report.ErrorCount(), summary[0])
|
||||
}
|
||||
return fmt.Errorf("validation failed with %d error(s)", report.ErrorCount())
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user