Skip to content

Commit

Permalink
Merge pull request #1434 from gogolok/loop_deprecation
Browse files Browse the repository at this point in the history
lint: Replace `exportloopref` by `copyloopvar` and `intrange`
  • Loading branch information
jabrown85 authored Dec 3, 2024
2 parents 564dcd3 + 32f1113 commit 8cfa351
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 8 deletions.
3 changes: 2 additions & 1 deletion golangci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,16 @@ linters:
disable-all: true
enable:
- bodyclose
- copyloopvar
- dogsled
- errcheck
- exportloopref
- gocritic
- goimports
- gosec
- gosimple
- govet
- ineffassign
- intrange
- misspell
- nakedret
- revive
Expand Down
1 change: 0 additions & 1 deletion internal/name/ref_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ func testRef(t *testing.T, when spec.G, it spec.S) {
},
}
for _, tc := range testCases {
tc := tc
w := when
w(tc.condition, func() {
it(tc.does, func() {
Expand Down
3 changes: 0 additions & 3 deletions phase/extender_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,6 @@ func testExtender(t *testing.T, when spec.G, it spec.S) {
api.MustParse("0.12"),
api.MustParse("0.13"),
} {
platformAPI := platformAPI

when(fmt.Sprintf("using the platform API %s", platformAPI), func() {
it.Before(func() {
extender.PlatformAPI = platformAPI
Expand Down Expand Up @@ -379,7 +377,6 @@ func testExtender(t *testing.T, when spec.G, it spec.S) {
expectedImageSHA: notRebasableSHA,
},
} {
tc := tc
when := when
desc := func(b bool) string {
if b {
Expand Down
3 changes: 0 additions & 3 deletions phase/generator_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,8 +179,6 @@ func testGenerator(t *testing.T, when spec.G, it spec.S) {
api.MustParse("0.12"),
api.MustParse("0.13"),
} {
platformAPI := platformAPI

when(fmt.Sprintf("using the platform API %s", platformAPI), func() {
it.Before(func() {
generator.PlatformAPI = platformAPI
Expand Down Expand Up @@ -586,7 +584,6 @@ func testGenerator(t *testing.T, when spec.G, it spec.S) {
},
},
} {
tc := tc
when := when
when(tc.descCondition, func() {
if tc.before != nil {
Expand Down

0 comments on commit 8cfa351

Please sign in to comment.