Skip to content

Commit

Permalink
🧹 align asset scores in CLI report (#1307)
Browse files Browse the repository at this point in the history
Signed-off-by: Ivan Milchev <ivan@mondoo.com>
  • Loading branch information
imilchev authored May 29, 2024
1 parent 11aa5fa commit a04cc62
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion cli/reporter/print_compact.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
Expand Down

0 comments on commit a04cc62

Please sign in to comment.