Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
printresults:fix - duplicated vulnerability severities on result (#836)
On #760 we made an improvement on `getDefaultTotalVulnBySeverity` which reuse the map returned from `getDefaultCountBySeverity` as a value for all keys on the default map of vulnerability severities, but since a map in Go is a pointer we was using the same map to all keys and when we were going to count vulnerabilities by severity, we would update the same pointer for all the keys in that map, which caused inconsistent and duplicated values in the final result. This commit revert this change and call pr.getDefaultCountBySeverity for all keys on this map. The test case was copied and paste with this bug and was also updated. Signed-off-by: Matheus Alcantara <[email protected]>
- Loading branch information