From 5930a731ec91cb17367a51805b321bb85194390c Mon Sep 17 00:00:00 2001 From: Jay Mundrawala Date: Wed, 25 Sep 2024 06:17:16 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20Don't=20render=20assessments=20f?= =?UTF-8?q?or=20data=20queries?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Boolean data queries had an assessment and would print that instead of just the result --- cli/reporter/print_compact.go | 2 +- cli/reporter/render_asset_overview.go | 2 +- cli/reporter/render_policy.go | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cli/reporter/print_compact.go b/cli/reporter/print_compact.go index 0004db04..f766ca11 100644 --- a/cli/reporter/print_compact.go +++ b/cli/reporter/print_compact.go @@ -476,7 +476,7 @@ func (r *defaultReporter) printAssetQueries(resolved *policy.ResolvedPolicy, rep dataQueriesOutput := "" resolved.WithDataQueries(func(id string, query *policy.ExecutionQuery) { data := query.Code.FilterResults(results) - result := r.Reporter.Printer.Results(query.Code, data) + result := r.Reporter.Printer.Datas(query.Code, data) if result == "" { return } diff --git a/cli/reporter/render_asset_overview.go b/cli/reporter/render_asset_overview.go index 4a9d6298..c9324f6d 100644 --- a/cli/reporter/render_asset_overview.go +++ b/cli/reporter/render_asset_overview.go @@ -90,7 +90,7 @@ func renderAssetOverview(print *printer.Printer, policyObj *policy.Policy, repor // print data results filteredResults := codeBundle.FilterResults(results) - value := print.Results(codeBundle, filteredResults) + value := print.Datas(codeBundle, filteredResults) table = append(table, row{ Title: query.Title, diff --git a/cli/reporter/render_policy.go b/cli/reporter/render_policy.go index 70752e00..7a7453c6 100644 --- a/cli/reporter/render_policy.go +++ b/cli/reporter/render_policy.go @@ -101,7 +101,7 @@ func renderDataQueries(print *printer.Printer, policyObj *policy.Policy, report } } - result := print.Results(codeBundle, filteredResults) + result := print.Datas(codeBundle, filteredResults) result = strings.ReplaceAll(result, "\n", NewLineCharacter) res.WriteString(" Result:") writeQueryCompact(res, result)