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 2b4386a
Show file tree
Hide file tree
Showing 9 changed files with 5 additions and 153 deletions.
8 changes: 3 additions & 5 deletions .golangci.next.reference.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exhaustruct
- exportloopref
- exptostd
- fatcontext
- forbidigo
Expand Down Expand Up @@ -150,10 +148,8 @@ linters:
- errchkjson
- errname
- errorlint
- execinquery
- exhaustive
- exhaustruct
- exportloopref
- exptostd
- fatcontext
- forbidigo
Expand Down Expand Up @@ -243,12 +239,14 @@ linters:
- wsl
- zerologlint
- deadcode # Deprecated
- execinquery # Deprecated
- exhaustivestruct # Deprecated
- exportloopref # Deprecated
- golint # Deprecated
- gomnd # Deprecated
- ifshort # Deprecated
- interfacer # Deprecated
- maligned # Deprecated
- gomnd # Deprecated
- nosnakecase # Deprecated
- scopelint # Deprecated
- structcheck # Deprecated
Expand Down
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.

1 change: 0 additions & 1 deletion jsonschema/golangci.next.jsonschema.json
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@
"errorlint",
"exhaustive",
"exhaustruct",
"exportloopref",
"exptostd",
"fatcontext",
"forbidigo",
Expand Down
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 2b4386a

Please sign in to comment.