Skip to content

Commit 2b4386a

Browse files
committed
feat: deprecation step 2 of exportloopref
1 parent 49aaa37 commit 2b4386a

9 files changed

+5
-153
lines changed

.golangci.next.reference.yml

+3-5
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,8 @@ linters:
3131
- errchkjson
3232
- errname
3333
- errorlint
34-
- execinquery
3534
- exhaustive
3635
- exhaustruct
37-
- exportloopref
3836
- exptostd
3937
- fatcontext
4038
- forbidigo
@@ -150,10 +148,8 @@ linters:
150148
- errchkjson
151149
- errname
152150
- errorlint
153-
- execinquery
154151
- exhaustive
155152
- exhaustruct
156-
- exportloopref
157153
- exptostd
158154
- fatcontext
159155
- forbidigo
@@ -243,12 +239,14 @@ linters:
243239
- wsl
244240
- zerologlint
245241
- deadcode # Deprecated
242+
- execinquery # Deprecated
246243
- exhaustivestruct # Deprecated
244+
- exportloopref # Deprecated
247245
- golint # Deprecated
246+
- gomnd # Deprecated
248247
- ifshort # Deprecated
249248
- interfacer # Deprecated
250249
- maligned # Deprecated
251-
- gomnd # Deprecated
252250
- nosnakecase # Deprecated
253251
- scopelint # Deprecated
254252
- structcheck # Deprecated

go.mod

-1
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ require (
6363
github.com/kkHAIKE/contextcheck v1.1.5
6464
github.com/kulti/thelper v0.6.3
6565
github.com/kunwardeep/paralleltest v1.0.10
66-
github.com/kyoh86/exportloopref v0.1.11
6766
github.com/lasiar/canonicalheader v1.1.2
6867
github.com/ldez/exptostd v0.4.0
6968
github.com/ldez/gomoddirectives v0.6.1

go.sum

-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

jsonschema/golangci.next.jsonschema.json

-1
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,6 @@
349349
"errorlint",
350350
"exhaustive",
351351
"exhaustruct",
352-
"exportloopref",
353352
"exptostd",
354353
"fatcontext",
355354
"forbidigo",

pkg/golinters/exportloopref/exportloopref.go

-19
This file was deleted.

pkg/golinters/exportloopref/exportloopref_integration_test.go

-11
This file was deleted.

pkg/golinters/exportloopref/testdata/exportloopref.go

-46
This file was deleted.

pkg/golinters/exportloopref/testdata/exportloopref_cgo.go

-65
This file was deleted.

pkg/lint/lintersdb/builder_linter.go

+2-3
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import (
2525
"github.com/golangci/golangci-lint/pkg/golinters/errorlint"
2626
"github.com/golangci/golangci-lint/pkg/golinters/exhaustive"
2727
"github.com/golangci/golangci-lint/pkg/golinters/exhaustruct"
28-
"github.com/golangci/golangci-lint/pkg/golinters/exportloopref"
2928
"github.com/golangci/golangci-lint/pkg/golinters/exptostd"
3029
"github.com/golangci/golangci-lint/pkg/golinters/fatcontext"
3130
"github.com/golangci/golangci-lint/pkg/golinters/forbidigo"
@@ -278,12 +277,12 @@ func (LinterBuilder) Build(cfg *config.Config) ([]*linter.Config, error) {
278277
WithLoadForGoAnalysis().
279278
WithURL("https://github.com/GaijinEntertainment/go-exhaustruct"),
280279

281-
linter.NewConfig(exportloopref.New()).
280+
linter.NewConfig(linter.NewNoopDeprecated("exportloopref", cfg, linter.DeprecationError)).
282281
WithSince("v1.28.0").
283282
WithPresets(linter.PresetBugs).
284283
WithLoadForGoAnalysis().
285284
WithURL("https://github.com/kyoh86/exportloopref").
286-
DeprecatedWarning("Since Go1.22 (loopvar) this linter is no longer relevant.", "v1.60.2", "copyloopvar"),
285+
DeprecatedError("Since Go1.22 (loopvar) this linter is no longer relevant.", "v1.60.2", "copyloopvar"),
287286

288287
linter.NewConfig(exptostd.New()).
289288
WithSince("v1.63.0").

0 commit comments

Comments
 (0)