Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: generics #2991

Merged
merged 1 commit into from Jul 19, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions .golangci.reference.yml
Expand Up @@ -1905,6 +1905,7 @@ linters:
- noctx
- nolintlint
- nonamedreturns
- nosnakecase
- nosprintfhostport
- paralleltest
- prealloc
Expand Down Expand Up @@ -2005,6 +2006,7 @@ linters:
- noctx
- nolintlint
- nonamedreturns
- nosnakecase
- nosprintfhostport
- paralleltest
- prealloc
Expand Down
6 changes: 3 additions & 3 deletions go.mod
Expand Up @@ -101,12 +101,12 @@ require (
github.com/yagipy/maintidx v1.0.0
github.com/yeya24/promlinter v0.2.0
gitlab.com/bosi/decorder v0.2.2
golang.org/x/tools v0.1.11
golang.org/x/tools v0.1.12-0.20220628192153-7743d1d949f1
gopkg.in/yaml.v3 v3.0.1
honnef.co/go/tools v0.3.2
mvdan.cc/gofumpt v0.3.1
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442
)

require (
Expand Down Expand Up @@ -169,7 +169,7 @@ require (
go.uber.org/atomic v1.7.0 // indirect
go.uber.org/multierr v1.6.0 // indirect
go.uber.org/zap v1.17.0 // indirect
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
golang.org/x/sys v0.0.0-20220702020025-31831981b65f // indirect
Expand Down
15 changes: 6 additions & 9 deletions go.sum

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

33 changes: 11 additions & 22 deletions pkg/lint/lintersdb/manager.go
Expand Up @@ -288,8 +288,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.18.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetPerformance, linter.PresetBugs).
WithURL("https://github.com/timakin/bodyclose").
WithNoopFallback(m.cfg),
WithURL("https://github.com/timakin/bodyclose"),

linter.NewConfig(golinters.NewContainedCtx()).
WithSince("1.44.0").
Expand All @@ -300,8 +299,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.43.0").
WithPresets(linter.PresetBugs).
WithLoadForGoAnalysis().
WithURL("https://github.com/sylvia7788/contextcheck").
WithNoopFallback(m.cfg),
WithURL("https://github.com/sylvia7788/contextcheck"),

linter.NewConfig(golinters.NewCyclop(cyclopCfg)).
WithSince("v1.37.0").
Expand Down Expand Up @@ -561,8 +559,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithLoadForGoAnalysis().
WithPresets(linter.PresetStyle).
WithURL("https://github.com/mvdan/interfacer").
Deprecated("The repository of the linter has been archived by the owner.", "v1.38.0", "").
WithNoopFallback(m.cfg),
Deprecated("The repository of the linter has been archived by the owner.", "v1.38.0", ""),

linter.NewConfig(golinters.NewIreturn(ireturnCfg)).
WithSince("v1.43.0").
Expand Down Expand Up @@ -612,8 +609,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.38.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetBugs).
WithURL("https://github.com/gostaticanalysis/nilerr").
WithNoopFallback(m.cfg),
WithURL("https://github.com/gostaticanalysis/nilerr"),

linter.NewConfig(golinters.NewNilNil(nilNilCfg)).
WithSince("v1.43.0").
Expand All @@ -630,8 +626,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.28.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetPerformance, linter.PresetBugs).
WithURL("https://github.com/sonatard/noctx").
WithNoopFallback(m.cfg),
WithURL("https://github.com/sonatard/noctx"),

linter.NewConfig(golinters.NewNoNamedReturns(noNamedReturnsCfg)).
WithSince("v1.46.0").
Expand Down Expand Up @@ -680,8 +675,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.23.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetBugs, linter.PresetSQL).
WithURL("https://github.com/jingyugao/rowserrcheck").
WithNoopFallback(m.cfg),
WithURL("https://github.com/jingyugao/rowserrcheck"),

linter.NewConfig(golinters.NewScopelint()).
WithSince("v1.12.0").
Expand All @@ -693,8 +687,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.28.0").
WithPresets(linter.PresetBugs, linter.PresetSQL).
WithLoadForGoAnalysis().
WithURL("https://github.com/ryanrolds/sqlclosecheck").
WithNoopFallback(m.cfg),
WithURL("https://github.com/ryanrolds/sqlclosecheck"),

linter.NewConfig(golinters.NewStaticcheck(staticcheckCfg)).
WithSince("v1.0.0").
Expand All @@ -707,8 +700,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.0.0").
WithLoadForGoAnalysis().
WithPresets(linter.PresetUnused).
WithURL("https://github.com/opennota/check").
WithNoopFallback(m.cfg),
WithURL("https://github.com/opennota/check"),

linter.NewConfig(golinters.NewStylecheck(stylecheckCfg)).
WithSince("v1.20.0").
Expand Down Expand Up @@ -742,8 +734,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.32.0").
WithPresets(linter.PresetStyle, linter.PresetTest).
WithLoadForGoAnalysis().
WithURL("https://github.com/moricho/tparallel").
WithNoopFallback(m.cfg),
WithURL("https://github.com/moricho/tparallel"),

linter.NewConfig(golinters.NewTypecheck()).
WithSince("v1.3.0").
Expand All @@ -761,8 +752,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.9.0").
WithPresets(linter.PresetUnused).
WithLoadForGoAnalysis().
WithURL("https://github.com/mvdan/unparam").
WithNoopFallback(m.cfg),
WithURL("https://github.com/mvdan/unparam"),

linter.NewConfig(golinters.NewUnused(unusedCfg)).
WithSince("v1.20.0").
Expand All @@ -789,8 +779,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
WithSince("v1.38.0").
WithPresets(linter.PresetStyle).
WithLoadForGoAnalysis().
WithURL("https://github.com/sanposhiho/wastedassign").
WithNoopFallback(m.cfg),
WithURL("https://github.com/sanposhiho/wastedassign"),

linter.NewConfig(golinters.NewWhitespace(whitespaceCfg)).
WithSince("v1.19.0").
Expand Down