adding fails and fail skips

This commit is contained in:
2025-11-11 18:04:21 -05:00
parent b6dfca1cf2
commit f88893748a
2 changed files with 13 additions and 3 deletions

View File

@@ -98,11 +98,15 @@ func main() {
//this is better printing, it should probably group up the port issues in a better printing. Not sure how
lvl := os.Getenv("LOG_LEVEL")
fatalCount := 0
for _, p := range issues {
fmt.Println()
fmt.Println("----------------------------------------------------------------------------")
fmt.Println(p.Name)
for _, x := range p.Issues {
if x.Level == issue.FATAL {
fatalCount++
}
if lvl == "all" {
fmt.Printf("\tsafe: %t\n\tlevel: %s\n\tMessages:\n\t\t%s\n\n", x.Safe, x.Level, strings.Join(x.Messages, "\n\t\t"))
} else if lvl == "fatal" {
@@ -112,6 +116,10 @@ func main() {
}
}
}
if strings.EqualFold(os.Getenv("FAIL_ON_FATAL"), "yes") {
os.Exit(fatalCount)
}
}
// ensure cpus and mem_limit are set on the service