Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/esimonov/ifshort v1.0.4
github.com/fatih/color v1.13.0
github.com/fzipp/gocyclo v0.5.1
github.com/go-critic/go-critic v0.6.2
github.com/go-critic/go-critic v0.6.3
github.com/go-xmlfmt/xmlfmt v0.0.0-20191208150333-d5b6f63a941b
github.com/gofrs/flock v0.8.1
github.com/golangci/check v0.0.0-20180506172741-cfe4005ccda2
Expand Down Expand Up @@ -147,9 +147,10 @@ require (
github.com/prometheus/client_model v0.2.0 // indirect
github.com/prometheus/common v0.10.0 // indirect
github.com/prometheus/procfs v0.6.0 // indirect
github.com/quasilyte/go-ruleguard v0.3.15 // indirect
github.com/quasilyte/gogrep v0.0.0-20220103110004-ffaa07af02e3 // indirect
github.com/quasilyte/go-ruleguard v0.3.16-0.20220213074421-6aa060fab41a // indirect
github.com/quasilyte/gogrep v0.0.0-20220120141003-628d8b3623b5 // indirect
github.com/quasilyte/regex/syntax v0.0.0-20200407221936-30656e2c4a95 // indirect
github.com/quasilyte/stdinfo v0.0.0-20220114132959-f7386bf02567 // indirect
github.com/spf13/afero v1.6.0 // indirect
github.com/spf13/cast v1.4.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
Expand Down
18 changes: 9 additions & 9 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pkg/commands/help.go
Original file line number Diff line number Diff line change
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
2 changes: 1 addition & 1 deletion pkg/golinters/goanalysis/adapters.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func MakeFakeLoaderProgram(pass *analysis.Pass) *loader.Program {
{
Pkg: pass.Pkg,
Importable: true, // not used
TransitivelyErrorFree: true, // TODO
TransitivelyErrorFree: true, // TODO ???

Files: pass.Files,
Errors: nil,
Expand Down
5 changes: 2 additions & 3 deletions pkg/lint/lintersdb/enabled_set.go
Original file line number Diff line number Diff line change
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