Skip to content

Commit

Permalink
Merge pull request #58 from qonto/improve-single-run
Browse files Browse the repository at this point in the history
Improve run command output
  • Loading branch information
victorboissiere authored Mar 28, 2024
2 parents c24dbf3 + 67bc219 commit 917311a
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions cmd/output.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package cmd

import (
"fmt"
"strings"

"github.com/qonto/standards-insights/pkg/checker/aggregates"
)
Expand All @@ -11,10 +12,18 @@ func stdoutResults(results []aggregates.ProjectResult) {
fmt.Printf("== Project %s\n", project.Name)
for _, result := range project.CheckResults {
if result.Success {
fmt.Printf("✅ Check %s PASS (labels: %s)\n", result.Name, result.Labels)
fmt.Printf("✅ Check %s PASS\n", result.Name)
for key, value := range result.Labels {
fmt.Printf("\t%s: %s\n", key, value)
}
} else {
fmt.Printf("🚨 Check %s FAILED (labels: %s)\n", result.Name, result.Labels)
fmt.Printf("🚨 %+v\n", result)
fmt.Printf("🚨 Check %s FAILED\n", result.Name)
for key, value := range result.Labels {
fmt.Printf("\t%s: %s\n", key, value)
}
for _, ruleResult := range result.Results {
fmt.Printf("\tMessage: %s\n", strings.Join(ruleResult.Messages, ","))
}
}
}
}
Expand Down

0 comments on commit 917311a

Please sign in to comment.