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: disable temporarily httpresponse from govet #4528

Merged
merged 4 commits into from Mar 19, 2024
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
10 changes: 7 additions & 3 deletions .golangci.yml
Expand Up @@ -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"
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion pkg/golinters/godot.go
Expand Up @@ -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
}
}
Expand Down
6 changes: 6 additions & 0 deletions pkg/golinters/govet.go
Expand Up @@ -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
Expand Down