createFallbackReport creates a fallback report without writing it This is used when we need to combine VSA and fallback output into a single file
(allData AllSectionsData, vsaData *validateVSAData)
| 1113 | // createFallbackReport creates a fallback report without writing it |
| 1114 | // This is used when we need to combine VSA and fallback output into a single file |
| 1115 | func createFallbackReport(allData AllSectionsData, vsaData *validateVSAData) (*applicationsnapshot.Report, error) { |
| 1116 | reportData, err := buildFallbackReportData(allData.FallbackResults, vsaData) |
| 1117 | if err != nil { |
| 1118 | return nil, err |
| 1119 | } |
| 1120 | |
| 1121 | // Create the report without writing it (same logic as WriteReport but without the WriteAll call) |
| 1122 | report, err := applicationsnapshot.NewReport( |
| 1123 | reportData.Snapshot, |
| 1124 | reportData.Components, |
| 1125 | reportData.Policy, |
| 1126 | reportData.PolicyInputs, |
| 1127 | reportData.ShowSuccesses, |
| 1128 | reportData.ShowWarnings, |
| 1129 | reportData.ShowPolicyDocsLink, |
| 1130 | reportData.Expansion, |
| 1131 | ) |
| 1132 | if err != nil { |
| 1133 | return nil, err |
| 1134 | } |
| 1135 | |
| 1136 | return &report, nil |
| 1137 | } |
| 1138 | |
| 1139 | // displayFallbackImageSection - Displays fallback validate image output using WriteReport |
| 1140 | func displayFallbackImageSection(allData AllSectionsData, vsaData *validateVSAData, cmd *cobra.Command) error { |
no test coverage detected