Skip to content

Commit

Permalink
fix: golangci loopref linter (#996)
Browse files Browse the repository at this point in the history
  • Loading branch information
silaslenihan authored Dec 31, 2024
1 parent 0df579b commit 61c33fc
Show file tree
Hide file tree
Showing 7 changed files with 1 addition and 8 deletions.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ run:
linters:
enable:
- exhaustive
- exportloopref
- copyloopvar
- revive
- goimports
- gosec
Expand Down
1 change: 0 additions & 1 deletion integration-tests/smoke/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func TestSolanaOCRV2Smoke(t *testing.T) {
t.Fatal(err)
}

test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()
_, sg := startOCR2DataFeedsSmokeTest(t, test.name, test.env, config, "")
Expand Down
1 change: 0 additions & 1 deletion integration-tests/soak/ocr2_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ func TestSolanaOCRV2Soak(t *testing.T) {
t.Fatal(err)
}

test := test
t.Run(test.name, func(t *testing.T) {
t.Parallel()

Expand Down
2 changes: 0 additions & 2 deletions integration-tests/solclient/deployer.go
Original file line number Diff line number Diff line change
Expand Up @@ -503,7 +503,6 @@ func (c *ContractDeployer) DeployAnchorProgramsRemote(contractsDir string, env *
log.Debug().Interface("Binaries", contractBinaries).Msg("Program binaries")
g := errgroup.Group{}
for _, bin := range contractBinaries {
bin := bin
g.Go(func() error {
return c.DeployProgramRemote(bin, env)
})
Expand All @@ -519,7 +518,6 @@ func (c *ContractDeployer) DeployAnchorProgramsRemoteDocker(baseDir, subDir stri
log.Info().Interface("Binaries", contractBinaries).Msg(fmt.Sprintf("Program binaries [%s]", filepath.Join("programs", subDir)))
g := errgroup.Group{}
for _, bin := range contractBinaries {
bin := bin
g.Go(func() error {
return c.DeployProgramRemoteLocal(filepath.Join(subDir, bin), sol, programIDBuilder)
})
Expand Down
1 change: 0 additions & 1 deletion pkg/solana/config_tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ func ConfigFromState(ctx context.Context, state State) (types.ContractConfig, er
return types.ContractConfig{}, err
}
for _, o := range oracles {
o := o // https://github.com/golang/go/wiki/CommonMistakes#using-reference-to-loop-iterator-variable
pubKeys = append(pubKeys, o.Signer.Key[:])
accounts = append(accounts, types.Account(o.Transmitter.String()))
}
Expand Down
1 change: 0 additions & 1 deletion pkg/solana/report_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ func TestMedianFromReport(t *testing.T) {
}

for _, tc := range tt {
tc := tc
t.Run(tc.name, func(t *testing.T) {
ctx := tests.Context(t)
var pos []median.ParsedAttributedObservation
Expand Down
1 change: 0 additions & 1 deletion pkg/solana/txm/pendingtx_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1304,7 +1304,6 @@ func TestPendingTxContext_ListAllExpiredBroadcastedTxs(t *testing.T) {
}

for _, tt := range tests {
tt := tt // capture range variable
t.Run(tt.name, func(t *testing.T) {
// Initialize a new PendingTxContext
ctx := newPendingTxContext()
Expand Down

0 comments on commit 61c33fc

Please sign in to comment.