Skip to content

Commit

Permalink
fix: golangci loopref linter
Browse files Browse the repository at this point in the history
  • Loading branch information
silaslenihan committed Dec 31, 2024
1 parent 0df579b commit a77e51e
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 4 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 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 a77e51e

Please sign in to comment.