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 8dae415
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 144 deletions.
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 8dae415

Please sign in to comment.