fix: disable temporarily httpresponse from govet (#4528)
Some checks failed
Release a tag / release (push) Has been cancelled

This commit is contained in:
Ludovic Fernandez 2024-03-19 23:57:15 +01:00 committed by GitHub
parent 1b6f0069d4
commit ddc703dd93
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 14 additions and 4 deletions

View File

@ -152,6 +152,10 @@ issues:
- gomnd
- lll
- path: pkg/golinters
linters:
- dupl
- path: pkg/golinters/errcheck.go
linters: [staticcheck]
text: "SA1019: errCfg.Exclude is deprecated: use ExcludeFunctions instead"
@ -166,9 +170,9 @@ issues:
- path: pkg/commands/config.go
text: "SA1019: cfg.Run.UseDefaultSkipDirs is deprecated: use Issues.UseDefaultExcludeDirs instead."
- path: pkg/golinters
linters:
- dupl
- path: pkg/golinters/godot.go
linters: [staticcheck]
text: "SA1019: settings.CheckAll is deprecated: use `Scope` instead"
- path: pkg/golinters/gofumpt.go
linters: [staticcheck]

View File

@ -30,7 +30,7 @@ func NewGodot(settings *config.GodotSettings) *goanalysis.Linter {
// Convert deprecated setting
// todo(butuzov): remove on v2 release
if settings.CheckAll { //nolint:staticcheck // Keep for retro-compatibility.
if settings.CheckAll {
dotSettings.Scope = godot.AllScope
}
}

View File

@ -184,6 +184,12 @@ func isAnalyzerEnabled(name string, cfg *config.GovetSettings, defaultAnalyzers
return false
}
// TODO(ldez) re-enable httpresponse once https://github.com/golangci/golangci-lint/issues/4482 is fixed.
if name == httpresponse.Analyzer.Name {
govetDebugf("httpresponse is disabled due to panic. See https://github.com/golang/go/issues/66259")
return false
}
// Keeping for backward compatibility.
if cfg.CheckShadowing && name == shadow.Analyzer.Name {
return true