Fix promlint order algorithm not work issue.

Signed-off-by: RainbowMango <renhongcai@huawei.com>
This commit is contained in:
RainbowMango 2019-12-11 14:56:28 +08:00
parent 0a0a228db3
commit f9de671cdd
1 changed files with 2 additions and 0 deletions

View File

@ -87,6 +87,8 @@ func (l *Linter) Lint() ([]Problem, error) {
sort.SliceStable(problems, func(i, j int) bool {
if problems[i].Metric < problems[j].Metric {
return true
} else if problems[i].Metric > problems[j].Metric {
return false
}
return problems[i].Text < problems[j].Text