Skip to content

Commit b525f2b

Browse files
authored
govet: disable loopclosure with go1.22 (#4357)
1 parent ca7b7a4 commit b525f2b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/golinters/govet.go

+4
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,10 @@ func analyzersFromConfig(settings *config.GovetSettings) []*analysis.Analyzer {
170170
}
171171

172172
func isAnalyzerEnabled(name string, cfg *config.GovetSettings, defaultAnalyzers []*analysis.Analyzer) bool {
173+
if name == loopclosure.Analyzer.Name && config.IsGreaterThanOrEqualGo122(cfg.Go) {
174+
return false
175+
}
176+
173177
if cfg.EnableAll {
174178
for _, n := range cfg.Disable {
175179
if n == name {

0 commit comments

Comments
 (0)