Skip to content

Commit

Permalink
Use sort.SliceStable instead of sort.Slice
Browse files Browse the repository at this point in the history
  • Loading branch information
nakabonne committed Apr 21, 2020
1 parent 0108387 commit 9442a41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/golinters/nestif.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func NewNestif() *goanalysis.Linter {
return nil, nil
}

sort.Slice(issues, func(i, j int) bool {
sort.SliceStable(issues, func(i, j int) bool {
return issues[i].Complexity > issues[j].Complexity
})

Expand Down

0 comments on commit 9442a41

Please sign in to comment.