Skip to content

Commit 931a2e6

Browse files
alarso16maru-ava
authored andcommitted
Squashed commits from alarso16/graft-lint
change linter to filter geth files automated lint-fix manual golangci-lint changes add remaining linters
1 parent 43cc027 commit 931a2e6

File tree

158 files changed

+507
-739
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

158 files changed

+507
-739
lines changed

.golangci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -254,7 +254,7 @@ linters:
254254
# 2. Exclude any file prefixed with test_ in any directory.
255255
# 3. Exclude any directory suffixed with test.
256256
# 4. Exclude any file suffixed with _test.go.
257-
- path: "(^tests/)|(^(.*/)*test_[^/]*\\.go$)|(.*test/.*)|(.*_test\\.go$)"
257+
- path: "/[^/]*tests?/|(^|.*/)(test_[^/]*\\.go$)|(_test\\.go$)"
258258
linters:
259259
- gosec
260260
- prealloc

graft/coreth/.avalanche-golangci.yml

Lines changed: 0 additions & 255 deletions
This file was deleted.

graft/coreth/consensus/dummy/consensus.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,6 @@ import (
88
"fmt"
99
"math/big"
1010

11-
"github.com/ava-labs/avalanchego/vms/components/gas"
12-
"github.com/ava-labs/avalanchego/vms/evm/acp226"
1311
"github.com/ava-labs/libevm/common"
1412
"github.com/ava-labs/libevm/core/state"
1513
"github.com/ava-labs/libevm/core/types"
@@ -21,6 +19,8 @@ import (
2119
"github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/customheader"
2220
"github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/customtypes"
2321
"github.com/ava-labs/avalanchego/graft/coreth/utils"
22+
"github.com/ava-labs/avalanchego/vms/components/gas"
23+
"github.com/ava-labs/avalanchego/vms/evm/acp226"
2424
)
2525

2626
var (

graft/coreth/core/extstate/statedb.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ package extstate
66
import (
77
"math/big"
88

9-
"github.com/ava-labs/avalanchego/vms/evm/predicate"
109
"github.com/ava-labs/libevm/common"
1110
"github.com/ava-labs/libevm/core/state"
1211
"github.com/ava-labs/libevm/core/types"
@@ -16,6 +15,7 @@ import (
1615

1716
"github.com/ava-labs/avalanchego/graft/coreth/params"
1817
"github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/customtypes"
18+
"github.com/ava-labs/avalanchego/vms/evm/predicate"
1919
)
2020

2121
// RegisterExtras registers hooks with libevm to achieve Avalanche state

graft/coreth/core/predicate_check.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ import (
77
"errors"
88
"fmt"
99

10-
"github.com/ava-labs/avalanchego/utils/set"
11-
"github.com/ava-labs/avalanchego/vms/evm/predicate"
1210
"github.com/ava-labs/libevm/core/types"
1311
"github.com/ava-labs/libevm/log"
1412

1513
"github.com/ava-labs/avalanchego/graft/coreth/params"
1614
"github.com/ava-labs/avalanchego/graft/coreth/precompile/precompileconfig"
15+
"github.com/ava-labs/avalanchego/utils/set"
16+
"github.com/ava-labs/avalanchego/vms/evm/predicate"
1717
)
1818

1919
var ErrMissingPredicateContext = errors.New("missing predicate context")

graft/coreth/core/predicate_check_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,16 +9,16 @@ import (
99
"slices"
1010
"testing"
1111

12-
"github.com/ava-labs/avalanchego/snow/engine/snowman/block"
13-
"github.com/ava-labs/avalanchego/utils/set"
14-
"github.com/ava-labs/avalanchego/vms/evm/predicate"
1512
"github.com/ava-labs/libevm/common"
1613
"github.com/ava-labs/libevm/core/types"
1714
"github.com/stretchr/testify/require"
1815
"go.uber.org/mock/gomock"
1916

2017
"github.com/ava-labs/avalanchego/graft/coreth/params"
2118
"github.com/ava-labs/avalanchego/graft/coreth/precompile/precompileconfig"
19+
"github.com/ava-labs/avalanchego/snow/engine/snowman/block"
20+
"github.com/ava-labs/avalanchego/utils/set"
21+
"github.com/ava-labs/avalanchego/vms/evm/predicate"
2222
)
2323

2424
var (

graft/coreth/internal/ethapi/api.coreth_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@ import (
88
"math/big"
99
"testing"
1010

11-
"github.com/ava-labs/avalanchego/vms/evm/acp176"
1211
"github.com/ava-labs/libevm/common"
1312
"github.com/ava-labs/libevm/common/hexutil"
1413
"github.com/stretchr/testify/require"
1514

1615
"github.com/ava-labs/avalanchego/graft/coreth/params"
16+
"github.com/ava-labs/avalanchego/vms/evm/acp176"
1717
)
1818

1919
type testSuggestPriceOptionsBackend struct {

graft/coreth/network/network.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ import (
1010
"sync"
1111
"time"
1212

13+
"github.com/ava-labs/libevm/log"
14+
"github.com/prometheus/client_golang/prometheus"
15+
"golang.org/x/sync/semaphore"
16+
1317
"github.com/ava-labs/avalanchego/codec"
18+
"github.com/ava-labs/avalanchego/graft/coreth/network/stats"
19+
"github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/message"
1420
"github.com/ava-labs/avalanchego/ids"
1521
"github.com/ava-labs/avalanchego/network/p2p"
1622
"github.com/ava-labs/avalanchego/snow"
@@ -19,12 +25,6 @@ import (
1925
"github.com/ava-labs/avalanchego/utils"
2026
"github.com/ava-labs/avalanchego/utils/set"
2127
"github.com/ava-labs/avalanchego/version"
22-
"github.com/ava-labs/libevm/log"
23-
"github.com/prometheus/client_golang/prometheus"
24-
"golang.org/x/sync/semaphore"
25-
26-
"github.com/ava-labs/avalanchego/graft/coreth/network/stats"
27-
"github.com/ava-labs/avalanchego/graft/coreth/plugin/evm/message"
2828
)
2929

3030
// Minimum amount of time to handle a request

0 commit comments

Comments
 (0)