displayComponentResults displays the validation results for each component Uses the new modular section-based approach Supports yaml, json, and text output formats based on the output flag
(allResults []vsa.ComponentResult, data *validateVSAData, cmd *cobra.Command)
| 1489 | // Uses the new modular section-based approach |
| 1490 | // Supports yaml, json, and text output formats based on the output flag |
| 1491 | func displayComponentResults(allResults []vsa.ComponentResult, data *validateVSAData, cmd *cobra.Command) error { |
| 1492 | allData := aggregateAllSectionsData(allResults) |
| 1493 | display := buildComponentResultsDisplay(allData) |
| 1494 | vsaOutputFormats := filterVSAOutputFormats(data.output) |
| 1495 | |
| 1496 | if hasFileOutputInFormats(vsaOutputFormats) { |
| 1497 | return writeCombinedReportToFiles(display, allData, data, vsaOutputFormats, cmd) |
| 1498 | } |
| 1499 | |
| 1500 | return writeSeparateOutputToStdout(display, allData, data, vsaOutputFormats, cmd) |
| 1501 | } |
| 1502 | |
| 1503 | // buildComponentResultsDisplay creates a ComponentResultsDisplay from aggregated data |
| 1504 | func buildComponentResultsDisplay(allData AllSectionsData) ComponentResultsDisplay { |
no test coverage detected