(io *iostreams.IOStreams, counts checkCounts)
| 67 | } |
| 68 | |
| 69 | func printSummary(io *iostreams.IOStreams, counts checkCounts) { |
| 70 | summary := "" |
| 71 | if counts.Failed+counts.Passed+counts.Skipping+counts.Pending > 0 { |
| 72 | if counts.Failed > 0 { |
| 73 | summary = "Some checks were not successful" |
| 74 | } else if counts.Pending > 0 { |
| 75 | summary = "Some checks are still pending" |
| 76 | } else if counts.Canceled > 0 { |
| 77 | summary = "Some checks were cancelled" |
| 78 | } else { |
| 79 | summary = "All checks were successful" |
| 80 | } |
| 81 | |
| 82 | tallies := fmt.Sprintf("%d cancelled, %d failing, %d successful, %d skipped, and %d pending checks", |
| 83 | counts.Canceled, counts.Failed, counts.Passed, counts.Skipping, counts.Pending) |
| 84 | |
| 85 | summary = fmt.Sprintf("%s\n%s", io.ColorScheme().Bold(summary), tallies) |
| 86 | } |
| 87 | |
| 88 | if io.IsStdoutTTY() { |
| 89 | fmt.Fprintln(io.Out, summary) |
| 90 | fmt.Fprintln(io.Out) |
| 91 | } |
| 92 | } |
| 93 | |
| 94 | func printTable(io *iostreams.IOStreams, checks []check) error { |
| 95 | var headers []string |
no test coverage detected