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

Function determineStatusFromReport

cmd/validate/vsa.go:1419–1429  ·  view source on GitHub ↗

determineStatusFromReport determines overall status from VSAReport Prefers fallback result if available, otherwise uses VSA result

(report VSAReport, display ComponentResultsDisplay)

Source from the content-addressed store, hash-verified

1417// determineStatusFromReport determines overall status from VSAReport
1418// Prefers fallback result if available, otherwise uses VSA result
1419func determineStatusFromReport(report VSAReport, display ComponentResultsDisplay) string {
1420 if report.Fallback != nil {
1421 // Fallback was used, use its success status
1422 if report.Fallback.Success {
1423 return statusSuccess
1424 }
1425 return statusFailure
1426 }
1427 // Use VSA result
1428 return determineStatusFromOverall(display.Result.Overall)
1429}
1430
1431// captureFallbackText captures the text output from a fallback report
1432func captureFallbackText(fallbackReport *applicationsnapshot.Report, fs afero.Fs) (string, error) {

Callers 1

marshalVSAReportStatusFunction · 0.85

Calls 1

Tested by

no test coverage detected