Improved Logging

This commit is contained in:
2026-04-09 21:56:53 +02:00
parent 8f0b8a5d66
commit 9e13bb9bab
6 changed files with 249 additions and 46 deletions
+5 -1
View File
@@ -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
}