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

Function shouldPrintFallbackHeader

cmd/validate/vsa.go:1183–1191  ·  view source on GitHub ↗

shouldPrintFallbackHeader determines if the fallback header should be printed The header should only be printed when using text format or when no format is specified (which defaults to text in WriteReport)

(outputFormats []string)

Source from the content-addressed store, hash-verified

1181// The header should only be printed when using text format or when no format is specified
1182// (which defaults to text in WriteReport)
1183func shouldPrintFallbackHeader(outputFormats []string) bool {
1184 // If no output formats specified, WriteReport defaults to text
1185 if len(outputFormats) == 0 {
1186 return true
1187 }
1188
1189 // Check if "text" format is in the output formats
1190 return validate_utils.ContainsOutputFormat(outputFormats, outputFormatText)
1191}
1192
1193// toVSASectionsReport converts ComponentResultsDisplay to VSASectionsReport
1194func (d ComponentResultsDisplay) toVSASectionsReport() VSASectionsReport {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected