Skip to content

Commit 2347243

Browse files
committed
terminal.go: when diffiing, compared based on scores, not string values
This meant NONE -> MEDIUM would get a different indicator then LOW -> MEDIUM. Signed-off-by: Steve Beattie <steve.beattie@chainguard.dev>
1 parent b79b3ce commit 2347243

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pkg/render/terminal.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -291,10 +291,10 @@ func renderFileSummary(_ context.Context, fr *malcontent.FileReport, w io.Writer
291291
diff = color.HiGreenString("+")
292292
}
293293

294-
if riskLevel > previousRiskLevel {
294+
if riskScore > previousNsRiskScore[ns]{
295295
nsIcon = color.HiYellowString("▲")
296296
}
297-
if riskLevel < previousRiskLevel {
297+
if riskScore < previousNsRiskScore[ns]{
298298
nsIcon = color.HiGreenString("▼")
299299
}
300300
if riskLevel == "NONE" {

0 commit comments

Comments
 (0)