Skip to content

Commit

Permalink
chore: update
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Apr 11, 2022
1 parent c2d9322 commit 8986f65
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Expand Up @@ -28,6 +28,7 @@ linters-settings:
- octalLiteral
- whyNoLint
- wrapperFunc
- todoCommentWithoutDetail
gocyclo:
min-complexity: 15
goimports:
Expand Down
2 changes: 1 addition & 1 deletion pkg/commands/help.go
Expand Up @@ -39,7 +39,7 @@ func (e *Executor) initHelp() {

func printLinterConfigs(lcs []*linter.Config) {
sort.Slice(lcs, func(i, j int) bool {
return strings.Compare(lcs[i].Name(), lcs[j].Name()) < 0
return lcs[i].Name() < lcs[j].Name()
})
for _, lc := range lcs {
altNamesStr := ""
Expand Down
5 changes: 2 additions & 3 deletions pkg/lint/lintersdb/enabled_set.go
Expand Up @@ -3,7 +3,6 @@ package lintersdb
import (
"os"
"sort"
"strings"

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

return resultLinters, nil
Expand Down Expand Up @@ -168,7 +167,7 @@ func (es EnabledSet) combineGoAnalysisLinters(linters map[string]*linter.Config)
return false
}

return strings.Compare(a.Name(), b.Name()) <= 0
return a.Name() <= b.Name()
})

ml := goanalysis.NewMetaLinter(goanalysisLinters)
Expand Down

0 comments on commit 8986f65

Please sign in to comment.