Skip to content

Commit 8986f65

Browse files
committed
chore: update
1 parent c2d9322 commit 8986f65

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.golangci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ linters-settings:
2828
- octalLiteral
2929
- whyNoLint
3030
- wrapperFunc
31+
- todoCommentWithoutDetail
3132
gocyclo:
3233
min-complexity: 15
3334
goimports:

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/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)