Skip to content

Commit 1213516

Browse files
committed
More lint fixes
1 parent 08c04e3 commit 1213516

File tree

9 files changed

+12
-11
lines changed

9 files changed

+12
-11
lines changed

lib/client/rpc_suite_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// nolint
12
package client
23

34
import (

lib/client/rpc_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// nolint
12
package client
23

34
import (

lib/config/network.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,21 +90,21 @@ func (n *NetworkConfig) OverrideURLsAndKeysFromEVMNetwork() {
9090
return
9191
}
9292
for name, evmNetwork := range n.EVMNetworks {
93-
if evmNetwork.URLs != nil && len(evmNetwork.URLs) > 0 {
93+
if len(evmNetwork.URLs) > 0 {
9494
logging.L.Warn().Str("network", name).Msg("found URLs in EVMNetwork. overriding RPC URLs in RpcWsUrls with EVMNetwork URLs")
9595
if n.RpcWsUrls == nil {
9696
n.RpcWsUrls = make(map[string][]string)
9797
}
9898
n.RpcWsUrls[name] = evmNetwork.URLs
9999
}
100-
if evmNetwork.HTTPURLs != nil && len(evmNetwork.HTTPURLs) > 0 {
100+
if len(evmNetwork.HTTPURLs) > 0 {
101101
logging.L.Warn().Str("network", name).Msg("found HTTPURLs in EVMNetwork. overriding RPC URLs in RpcHttpUrls with EVMNetwork HTTP URLs")
102102
if n.RpcHttpUrls == nil {
103103
n.RpcHttpUrls = make(map[string][]string)
104104
}
105105
n.RpcHttpUrls[name] = evmNetwork.HTTPURLs
106106
}
107-
if evmNetwork.PrivateKeys != nil && len(evmNetwork.PrivateKeys) > 0 {
107+
if len(evmNetwork.PrivateKeys) > 0 {
108108
logging.L.Warn().Str("network", name).Msg("found PrivateKeys in EVMNetwork. overriding wallet keys in WalletKeys with EVMNetwork private keys")
109109
if n.WalletKeys == nil {
110110
n.WalletKeys = make(map[string][]string)

lib/config/testconfig_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ func TestValidateNetworkConfig(t *testing.T) {
218218
}
219219

220220
for _, tc := range testCases {
221-
tc := tc // capture range variable
221+
tc := tc //nolint capture range variable
222222
t.Run(tc.name, func(t *testing.T) {
223223
err := tc.networkConfig.Validate()
224224
if tc.expectedError != nil {

lib/docker/test_env/killgrave_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// nolint
12
package test_env
23

34
import (

lib/gauntlet/gauntlet.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ func (g *Gauntlet) ExecCommandWithRetries(args []string, options ExecCommandOpti
154154
},
155155
retry.Delay(options.RetryDelay),
156156
retry.MaxDelay(options.RetryDelay),
157-
retry.Attempts(uint(options.RetryCount)),
157+
retry.Attempts(uint(options.RetryCount)), //nolint
158158
)
159159

160160
return output, err

lib/logstream/logstream_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// nolint
12
package logstream_test
23

34
import (

lib/networks/known_networks_test.go

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// nolint
12
package networks
23

34
import (
@@ -82,10 +83,6 @@ func TestVariousNetworkConfig(t *testing.T) {
8283
}
8384
httpOnlyNetwork := newNetwork
8485
httpOnlyNetwork.URLs = nil
85-
forkedNetwork := newNetwork
86-
forkedNetwork.HTTPURLs = nil
87-
forkedNetwork.URLs = nil
88-
forkedNetwork.PrivateKeys = nil
8986
t.Cleanup(func() {
9087
ArbitrumGoerli.URLs = []string{}
9188
ArbitrumGoerli.HTTPURLs = []string{}

lib/utils/seth/seth.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -257,10 +257,10 @@ func ValidateSethNetworkConfig(cfg *pkg_seth.Network) error {
257257
if cfg == nil {
258258
return errors.New("network cannot be nil")
259259
}
260-
if cfg.URLs == nil || len(cfg.URLs) == 0 {
260+
if len(cfg.URLs) == 0 {
261261
return errors.New("URLs are required")
262262
}
263-
if cfg.PrivateKeys == nil || len(cfg.PrivateKeys) == 0 {
263+
if len(cfg.PrivateKeys) == 0 {
264264
return errors.New("PrivateKeys are required")
265265
}
266266
if cfg.TransferGasFee == 0 {

0 commit comments

Comments
 (0)