From d2af7f47dbe71fe9b139817e73dfc273fae01b07 Mon Sep 17 00:00:00 2001 From: DRAGON Date: Mon, 31 Jul 2023 00:21:01 +0530 Subject: [PATCH] fix: negative compliance score Signed-off-by: DRAGON --- core/pkg/resultshandling/printer/v2/controltable.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/pkg/resultshandling/printer/v2/controltable.go b/core/pkg/resultshandling/printer/v2/controltable.go index bbf8af81..40d0933f 100644 --- a/core/pkg/resultshandling/printer/v2/controltable.go +++ b/core/pkg/resultshandling/printer/v2/controltable.go @@ -37,6 +37,9 @@ func generateRow(controlSummary reportsummary.IControlSummary, infoToPrintInfo [ row[columnCounterFailed] = fmt.Sprintf("%d", controlSummary.NumberOfResources().Failed()) row[columnCounterAll] = fmt.Sprintf("%d", controlSummary.NumberOfResources().All()) row[columnComplianceScore] = getComplianceScoreColumn(controlSummary, infoToPrintInfo) + if row[columnComplianceScore] == "-1%" { + row[columnComplianceScore] = "N/A" + } return row }