Sort plugin name lists for output (#8127)

This commit is contained in:
sambrolia 2020-09-15 21:55:23 +01:00 committed by GitHub
parent 0eb65029a4
commit 94481f6678
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -210,7 +210,7 @@ func (c *Config) OutputNames() []string {
return PluginNameCounts(name) return PluginNameCounts(name)
} }
// PluginNameCounts returns a list of plugin names and their count // PluginNameCounts returns a list of sorted plugin names and their count
func PluginNameCounts(plugins []string) []string { func PluginNameCounts(plugins []string) []string {
names := make(map[string]int) names := make(map[string]int)
for _, plugin := range plugins { for _, plugin := range plugins {
@ -226,6 +226,7 @@ func PluginNameCounts(plugins []string) []string {
} }
} }
sort.Strings(namecount)
return namecount return namecount
} }