writeCombinedReportToFiles writes VSA and fallback results to files in a combined format
(display ComponentResultsDisplay, allData AllSectionsData, data *validateVSAData, outputFormats []string, cmd *cobra.Command)
| 1512 | |
| 1513 | // writeCombinedReportToFiles writes VSA and fallback results to files in a combined format |
| 1514 | func writeCombinedReportToFiles(display ComponentResultsDisplay, allData AllSectionsData, data *validateVSAData, outputFormats []string, cmd *cobra.Command) error { |
| 1515 | vsaReport, err := buildVSAReport(display, allData, data) |
| 1516 | if err != nil { |
| 1517 | return err |
| 1518 | } |
| 1519 | |
| 1520 | fs := utils.FS(cmd.Context()) |
| 1521 | if err := writeVSAReport(vsaReport, display, outputFormats, fs, cmd); err != nil { |
| 1522 | return fmt.Errorf("failed to write VSA report: %w", err) |
| 1523 | } |
| 1524 | |
| 1525 | return nil |
| 1526 | } |
| 1527 | |
| 1528 | // buildVSAReport creates a VSAReport with optional fallback |
| 1529 | func buildVSAReport(display ComponentResultsDisplay, allData AllSectionsData, data *validateVSAData) (VSAReport, error) { |
no test coverage detected