Skip to content

Commit

Permalink
Fix table order
Browse files Browse the repository at this point in the history
  • Loading branch information
EyalDelarea committed Oct 5, 2023
1 parent 777ec51 commit c0de205
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion xray/utils/resultstable.go
Original file line number Diff line number Diff line change
Expand Up @@ -259,8 +259,9 @@ func sortVulnerabilityOrViolationRows(rows []formats.VulnerabilityOrViolationRow
if rows[i].SeverityNumValue != rows[j].SeverityNumValue {
return rows[i].SeverityNumValue > rows[j].SeverityNumValue
}
// No fix versions available should appear higher.
if len(rows[i].FixedVersions) != len(rows[j].FixedVersions) {
return len(rows[i].FixedVersions) > len(rows[j].FixedVersions)
return len(rows[i].FixedVersions) < len(rows[j].FixedVersions)
}
return rows[i].ImpactedDependencyName > rows[j].ImpactedDependencyName
})
Expand Down

0 comments on commit c0de205

Please sign in to comment.