1
0
mirror of https://github.com/securego/gosec.git synced 2025-11-25 22:22:17 +02:00

Fix error parsing when the loaded package is empty

Signed-off-by: Cosmin Cojocar <cosmin.cojocar@gmx.ch>
This commit is contained in:
Cosmin Cojocar
2019-04-30 08:13:10 +02:00
committed by Cosmin Cojocar
parent 48e39323f3
commit 92b3644625
2 changed files with 23 additions and 15 deletions

View File

@@ -22,7 +22,6 @@ func NewError(line, column int, err string) *Error {
// sortErros sorts the golang erros by line
func sortErrors(allErrors map[string][]Error) {
for _, errors := range allErrors {
sort.Slice(errors, func(i, j int) bool {
if errors[i].Line == errors[j].Line {