From a04cc627f654a280bc952a85ee4cedd491be113f Mon Sep 17 00:00:00 2001 From: Ivan Milchev Date: Wed, 29 May 2024 13:06:28 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=A7=B9=20align=20asset=20scores=20in=20CL?= =?UTF-8?q?I=20report=20(#1307)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Ivan Milchev --- cli/reporter/print_compact.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cli/reporter/print_compact.go b/cli/reporter/print_compact.go index d67af88d..0004db04 100644 --- a/cli/reporter/print_compact.go +++ b/cli/reporter/print_compact.go @@ -272,8 +272,9 @@ func (r *defaultReporter) printAssetsByPlatform(assetsByPlatform map[string][]*i assetScore = "X" } + paddedAssetScore := fmt.Sprintf("%-9s", assetScore) scoreColor := cnspecComponents.DefaultRatingColors.Color(assetScoreRating) - output := fmt.Sprintf(" %s %s", termenv.String(assetScore).Foreground(scoreColor), assetsByPlatform[platform][i].Name) + output := fmt.Sprintf(" %s %s", termenv.String(paddedAssetScore).Foreground(scoreColor), assetsByPlatform[platform][i].Name) r.out(output + NewLineCharacter) } }