mirror of
https://github.com/prometheus/prometheus.git
synced 2025-03-05 20:59:13 -08:00
Merge pull request #6445 from RainbowMango/pr_fix_promlint_order_algo
Fix promlint order algorithm not work issue
This commit is contained in:
commit
e53f751765
|
@ -87,6 +87,8 @@ func (l *Linter) Lint() ([]Problem, error) {
|
||||||
sort.SliceStable(problems, func(i, j int) bool {
|
sort.SliceStable(problems, func(i, j int) bool {
|
||||||
if problems[i].Metric < problems[j].Metric {
|
if problems[i].Metric < problems[j].Metric {
|
||||||
return true
|
return true
|
||||||
|
} else if problems[i].Metric > problems[j].Metric {
|
||||||
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
return problems[i].Text < problems[j].Text
|
return problems[i].Text < problems[j].Text
|
||||||
|
|
Loading…
Reference in a new issue