Skip to content

Commit

Permalink
feat: deprecation step 2 of exportloopref
Browse files Browse the repository at this point in the history
  • Loading branch information
ldez committed Jan 22, 2025
1 parent 49aaa37 commit 055be94
Show file tree
Hide file tree
Showing 7 changed files with 2 additions and 147 deletions.
1 change: 0 additions & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,6 @@ require (
github.com/kkHAIKE/contextcheck v1.1.5
github.com/kulti/thelper v0.6.3
github.com/kunwardeep/paralleltest v1.0.10
github.com/kyoh86/exportloopref v0.1.11
github.com/lasiar/canonicalheader v1.1.2
github.com/ldez/exptostd v0.4.0
github.com/ldez/gomoddirectives v0.6.1
Expand Down
2 changes: 0 additions & 2 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 0 additions & 19 deletions pkg/golinters/exportloopref/exportloopref.go

This file was deleted.

11 changes: 0 additions & 11 deletions pkg/golinters/exportloopref/exportloopref_integration_test.go

This file was deleted.

46 changes: 0 additions & 46 deletions pkg/golinters/exportloopref/testdata/exportloopref.go

This file was deleted.

65 changes: 0 additions & 65 deletions pkg/golinters/exportloopref/testdata/exportloopref_cgo.go

This file was deleted.

5 changes: 2 additions & 3 deletions pkg/lint/lintersdb/builder_linter.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@ import (
"github.com/golangci/golangci-lint/pkg/golinters/errorlint"
"github.com/golangci/golangci-lint/pkg/golinters/exhaustive"
"github.com/golangci/golangci-lint/pkg/golinters/exhaustruct"
"github.com/golangci/golangci-lint/pkg/golinters/exportloopref"
"github.com/golangci/golangci-lint/pkg/golinters/exptostd"
"github.com/golangci/golangci-lint/pkg/golinters/fatcontext"
"github.com/golangci/golangci-lint/pkg/golinters/forbidigo"
Expand Down Expand Up @@ -278,12 +277,12 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
WithLoadForGoAnalysis().
WithURL("https://github.com/GaijinEntertainment/go-exhaustruct"),

linter.NewConfig(exportloopref.New()).
linter.NewConfig(linter.NewNoopDeprecated("exportloopref", cfg, linter.DeprecationError)).
WithSince("v1.28.0").
WithPresets(linter.PresetBugs).
WithLoadForGoAnalysis().
WithURL("https://github.com/kyoh86/exportloopref").
DeprecatedWarning("Since Go1.22 (loopvar) this linter is no longer relevant.", "v1.60.2", "copyloopvar"),
DeprecatedError("Since Go1.22 (loopvar) this linter is no longer relevant.", "v1.60.2", "copyloopvar"),

linter.NewConfig(exptostd.New()).
WithSince("v1.63.0").
Expand Down

0 comments on commit 055be94

Please sign in to comment.