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

Function aggregatePolicyDiffTotals

cmd/validate/vsa.go:1078–1086  ·  view source on GitHub ↗

aggregatePolicyDiffTotals aggregates policy diff counts across all images

(diffCounts map[string]PolicyDiffCounts)

Source from the content-addressed store, hash-verified

1076
1077// aggregatePolicyDiffTotals aggregates policy diff counts across all images
1078func aggregatePolicyDiffTotals(diffCounts map[string]PolicyDiffCounts) PolicyDiffCounts {
1079 var totals PolicyDiffCounts
1080 for _, counts := range diffCounts {
1081 totals.Added += counts.Added
1082 totals.Removed += counts.Removed
1083 totals.Changed += counts.Changed
1084 }
1085 return totals
1086}
1087
1088// buildFallbackReportData builds report data for fallback validation results
1089func buildFallbackReportData(fallbackResults []validate_utils.Result, vsaData *validateVSAData) (validate_utils.ReportData, error) {

Callers 2

buildVSASummaryDisplayFunction · 0.85
buildPolicyDiffDisplayFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected