Skip to content

Commit eb16e70

Browse files
authored
fix: generics (#2991)
1 parent 4e60e8a commit eb16e70

File tree

4 files changed

+22
-34
lines changed

4 files changed

+22
-34
lines changed

.golangci.reference.yml

+2
Original file line numberDiff line numberDiff line change
@@ -1905,6 +1905,7 @@ linters:
19051905
- noctx
19061906
- nolintlint
19071907
- nonamedreturns
1908+
- nosnakecase
19081909
- nosprintfhostport
19091910
- paralleltest
19101911
- prealloc
@@ -2005,6 +2006,7 @@ linters:
20052006
- noctx
20062007
- nolintlint
20072008
- nonamedreturns
2009+
- nosnakecase
20082010
- nosprintfhostport
20092011
- paralleltest
20102012
- prealloc

go.mod

+3-3
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,12 @@ require (
101101
github.com/yagipy/maintidx v1.0.0
102102
github.com/yeya24/promlinter v0.2.0
103103
gitlab.com/bosi/decorder v0.2.2
104-
golang.org/x/tools v0.1.11
104+
golang.org/x/tools v0.1.12-0.20220628192153-7743d1d949f1
105105
gopkg.in/yaml.v3 v3.0.1
106106
honnef.co/go/tools v0.3.2
107107
mvdan.cc/gofumpt v0.3.1
108108
mvdan.cc/interfacer v0.0.0-20180901003855-c20040233aed
109-
mvdan.cc/unparam v0.0.0-20211214103731-d0ef000c54e5
109+
mvdan.cc/unparam v0.0.0-20220706161116-678bad134442
110110
)
111111

112112
require (
@@ -169,7 +169,7 @@ require (
169169
go.uber.org/atomic v1.7.0 // indirect
170170
go.uber.org/multierr v1.6.0 // indirect
171171
go.uber.org/zap v1.17.0 // indirect
172-
golang.org/x/exp/typeparams v0.0.0-20220218215828-6cf2b201936e // indirect
172+
golang.org/x/exp/typeparams v0.0.0-20220613132600-b0d781184e0d // indirect
173173
golang.org/x/mod v0.6.0-dev.0.20220419223038-86c51ed26bb4 // indirect
174174
golang.org/x/sync v0.0.0-20210220032951-036812b2e83c // indirect
175175
golang.org/x/sys v0.0.0-20220702020025-31831981b65f // indirect

go.sum

+6-9
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

pkg/lint/lintersdb/manager.go

+11-22
Original file line numberDiff line numberDiff line change
@@ -288,8 +288,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
288288
WithSince("v1.18.0").
289289
WithLoadForGoAnalysis().
290290
WithPresets(linter.PresetPerformance, linter.PresetBugs).
291-
WithURL("https://github.com/timakin/bodyclose").
292-
WithNoopFallback(m.cfg),
291+
WithURL("https://github.com/timakin/bodyclose"),
293292

294293
linter.NewConfig(golinters.NewContainedCtx()).
295294
WithSince("1.44.0").
@@ -300,8 +299,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
300299
WithSince("v1.43.0").
301300
WithPresets(linter.PresetBugs).
302301
WithLoadForGoAnalysis().
303-
WithURL("https://github.com/sylvia7788/contextcheck").
304-
WithNoopFallback(m.cfg),
302+
WithURL("https://github.com/sylvia7788/contextcheck"),
305303

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

567564
linter.NewConfig(golinters.NewIreturn(ireturnCfg)).
568565
WithSince("v1.43.0").
@@ -612,8 +609,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
612609
WithSince("v1.38.0").
613610
WithLoadForGoAnalysis().
614611
WithPresets(linter.PresetBugs).
615-
WithURL("https://github.com/gostaticanalysis/nilerr").
616-
WithNoopFallback(m.cfg),
612+
WithURL("https://github.com/gostaticanalysis/nilerr"),
617613

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

636631
linter.NewConfig(golinters.NewNoNamedReturns(noNamedReturnsCfg)).
637632
WithSince("v1.46.0").
@@ -680,8 +675,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
680675
WithSince("v1.23.0").
681676
WithLoadForGoAnalysis().
682677
WithPresets(linter.PresetBugs, linter.PresetSQL).
683-
WithURL("https://github.com/jingyugao/rowserrcheck").
684-
WithNoopFallback(m.cfg),
678+
WithURL("https://github.com/jingyugao/rowserrcheck"),
685679

686680
linter.NewConfig(golinters.NewScopelint()).
687681
WithSince("v1.12.0").
@@ -693,8 +687,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
693687
WithSince("v1.28.0").
694688
WithPresets(linter.PresetBugs, linter.PresetSQL).
695689
WithLoadForGoAnalysis().
696-
WithURL("https://github.com/ryanrolds/sqlclosecheck").
697-
WithNoopFallback(m.cfg),
690+
WithURL("https://github.com/ryanrolds/sqlclosecheck"),
698691

699692
linter.NewConfig(golinters.NewStaticcheck(staticcheckCfg)).
700693
WithSince("v1.0.0").
@@ -707,8 +700,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
707700
WithSince("v1.0.0").
708701
WithLoadForGoAnalysis().
709702
WithPresets(linter.PresetUnused).
710-
WithURL("https://github.com/opennota/check").
711-
WithNoopFallback(m.cfg),
703+
WithURL("https://github.com/opennota/check"),
712704

713705
linter.NewConfig(golinters.NewStylecheck(stylecheckCfg)).
714706
WithSince("v1.20.0").
@@ -742,8 +734,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
742734
WithSince("v1.32.0").
743735
WithPresets(linter.PresetStyle, linter.PresetTest).
744736
WithLoadForGoAnalysis().
745-
WithURL("https://github.com/moricho/tparallel").
746-
WithNoopFallback(m.cfg),
737+
WithURL("https://github.com/moricho/tparallel"),
747738

748739
linter.NewConfig(golinters.NewTypecheck()).
749740
WithSince("v1.3.0").
@@ -761,8 +752,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
761752
WithSince("v1.9.0").
762753
WithPresets(linter.PresetUnused).
763754
WithLoadForGoAnalysis().
764-
WithURL("https://github.com/mvdan/unparam").
765-
WithNoopFallback(m.cfg),
755+
WithURL("https://github.com/mvdan/unparam"),
766756

767757
linter.NewConfig(golinters.NewUnused(unusedCfg)).
768758
WithSince("v1.20.0").
@@ -789,8 +779,7 @@ func (m Manager) GetAllSupportedLinterConfigs() []*linter.Config {
789779
WithSince("v1.38.0").
790780
WithPresets(linter.PresetStyle).
791781
WithLoadForGoAnalysis().
792-
WithURL("https://github.com/sanposhiho/wastedassign").
793-
WithNoopFallback(m.cfg),
782+
WithURL("https://github.com/sanposhiho/wastedassign"),
794783

795784
linter.NewConfig(golinters.NewWhitespace(whitespaceCfg)).
796785
WithSince("v1.19.0").

0 commit comments

Comments
 (0)