MCPcopy Create free account
hub / github.com/conforma/cli / createFallbackReport

Function createFallbackReport

cmd/validate/vsa.go:1115–1137  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

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
1115func 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
1140func displayFallbackImageSection(allData AllSectionsData, vsaData *validateVSAData, cmd *cobra.Command) error {

Callers 1

buildVSAReportFunction · 0.85

Calls 2

NewReportFunction · 0.92
buildFallbackReportDataFunction · 0.85

Tested by

no test coverage detected