Skip to content

Commit

Permalink
fix: disable temporarily httpresponse from govet (#4528)
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez authored Mar 19, 2024
1 parent 1b6f006 commit ddc703d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
10 changes: 7 additions & 3 deletions .golangci.yml
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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

0 comments on commit ddc703d

Please sign in to comment.