Skip to content

Commit d1f4bdb

Browse files
committed
chore: update
1 parent c2d9322 commit d1f4bdb

File tree

3 files changed

+4
-5
lines changed

3 files changed

+4
-5
lines changed

pkg/commands/help.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func (e *Executor) initHelp() {
3939

4040
func printLinterConfigs(lcs []*linter.Config) {
4141
sort.Slice(lcs, func(i, j int) bool {
42-
return strings.Compare(lcs[i].Name(), lcs[j].Name()) < 0
42+
return lcs[i].Name() < lcs[j].Name()
4343
})
4444
for _, lc := range lcs {
4545
altNamesStr := ""

pkg/golinters/goanalysis/adapters.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ func MakeFakeLoaderProgram(pass *analysis.Pass) *loader.Program {
1919
{
2020
Pkg: pass.Pkg,
2121
Importable: true, // not used
22-
TransitivelyErrorFree: true, // TODO
22+
TransitivelyErrorFree: true, // TODO ???
2323

2424
Files: pass.Files,
2525
Errors: nil,

pkg/lint/lintersdb/enabled_set.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ package lintersdb
33
import (
44
"os"
55
"sort"
6-
"strings"
76

87
"github.com/golangci/golangci-lint/pkg/config"
98
"github.com/golangci/golangci-lint/pkg/golinters/goanalysis"
@@ -123,7 +122,7 @@ func (es EnabledSet) GetOptimizedLinters() ([]*linter.Config, error) {
123122
if a.DoesChangeTypes != b.DoesChangeTypes {
124123
return b.DoesChangeTypes // move type-changing linters to the end to optimize speed
125124
}
126-
return strings.Compare(a.Name(), b.Name()) < 0
125+
return a.Name() < b.Name()
127126
})
128127

129128
return resultLinters, nil
@@ -168,7 +167,7 @@ func (es EnabledSet) combineGoAnalysisLinters(linters map[string]*linter.Config)
168167
return false
169168
}
170169

171-
return strings.Compare(a.Name(), b.Name()) <= 0
170+
return a.Name() <= b.Name()
172171
})
173172

174173
ml := goanalysis.NewMetaLinter(goanalysisLinters)

0 commit comments

Comments
 (0)