From 66196a2245e7c866cc2a794c8b0108f58d64cf01 Mon Sep 17 00:00:00 2001 From: Renato Suero Date: Wed, 14 Oct 2020 14:43:16 +0200 Subject: [PATCH] Added func to sort linters --- scripts/expand_website_templates/main.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/expand_website_templates/main.go b/scripts/expand_website_templates/main.go index 3b531029a7a7..7705f96f2c90 100644 --- a/scripts/expand_website_templates/main.go +++ b/scripts/expand_website_templates/main.go @@ -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