Added func to sort linters ()

This commit is contained in:
Renato Suero 2020-10-18 08:14:31 +02:00 committed by GitHub
parent d20b8f931f
commit 89e94823d6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -13,6 +13,7 @@ import (
"os"
"os/exec"
"path/filepath"
"sort"
"strings"
"github.com/golangci/golangci-lint/internal/renameio"
@ -220,6 +221,9 @@ func getLintersListMarkdown(enabled bool) string {
}
}
sort.Slice(neededLcs, func(i, j int) bool {
return neededLcs[i].Name() < neededLcs[j].Name()
})
var lines []string
for _, lc := range neededLcs {
var link string