Skip to content

Commit ddc703d

Browse files
authored
fix: disable temporarily httpresponse from govet (#4528)
1 parent 1b6f006 commit ddc703d

File tree

3 files changed

+14
-4
lines changed

3 files changed

+14
-4
lines changed

.golangci.yml

+7-3
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,10 @@ issues:
152152
- gomnd
153153
- lll
154154

155+
- path: pkg/golinters
156+
linters:
157+
- dupl
158+
155159
- path: pkg/golinters/errcheck.go
156160
linters: [staticcheck]
157161
text: "SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead"
@@ -166,9 +170,9 @@ issues:
166170
- path: pkg/commands/config.go
167171
text: "SA1019: cfg.Run.UseDefaultSkipDirs is deprecated: use Issues.UseDefaultExcludeDirs instead."
168172

169-
- path: pkg/golinters
170-
linters:
171-
- dupl
173+
- path: pkg/golinters/godot.go
174+
linters: [staticcheck]
175+
text: "SA1019: settings.CheckAll is deprecated: use `Scope` instead"
172176

173177
- path: pkg/golinters/gofumpt.go
174178
linters: [staticcheck]

pkg/golinters/godot.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ func NewGodot(settings *config.GodotSettings) *goanalysis.Linter {
3030

3131
// Convert deprecated setting
3232
// todo(butuzov): remove on v2 release
33-
if settings.CheckAll { //nolint:staticcheck // Keep for retro-compatibility.
33+
if settings.CheckAll {
3434
dotSettings.Scope = godot.AllScope
3535
}
3636
}

pkg/golinters/govet.go

+6
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,12 @@ func isAnalyzerEnabled(name string, cfg *config.GovetSettings, defaultAnalyzers
184184
return false
185185
}
186186

187+
// TODO(ldez) re-enable httpresponse once https://github.com/golangci/golangci-lint/issues/4482 is fixed.
188+
if name == httpresponse.Analyzer.Name {
189+
govetDebugf("httpresponse is disabled due to panic. See https://github.com/golang/go/issues/66259")
190+
return false
191+
}
192+
187193
// Keeping for backward compatibility.
188194
if cfg.CheckShadowing && name == shadow.Analyzer.Name {
189195
return true

0 commit comments

Comments
 (0)