Skip to content

Commit

Permalink
golangci-lint run superchain/... validation/... --fix
Browse files Browse the repository at this point in the history
  • Loading branch information
geoknee committed Feb 28, 2024
1 parent 7b89d63 commit 4bb6f5f
Show file tree
Hide file tree
Showing 8 changed files with 2 additions and 15 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:
tag: '1.21'
steps:
- checkout
- run: golangci-lint run superchain validation
- run: golangci-lint run superchain/... validation/...
golang-modules-tidy:
executor:
name: go/default # is based on cimg/go
Expand Down
1 change: 0 additions & 1 deletion superchain/superchain.go
Original file line number Diff line number Diff line change
Expand Up @@ -485,7 +485,6 @@ func isConfigFile(c fs.DirEntry) bool {
strings.HasSuffix(c.Name(), ".yaml") &&
c.Name() != "superchain.yaml" &&
c.Name() != "semver.yaml")

}

func init() {
Expand Down
2 changes: 1 addition & 1 deletion superchain/superchain_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ func TestVersionFor(t *testing.T) {
_, err = cl.VersionFor("Garbage")
require.Error(t, err)
}

func TestChainIds(t *testing.T) {
chainIDs := map[uint64]bool{}

Expand Down Expand Up @@ -159,7 +160,6 @@ func TestContractVersionsCheck(t *testing.T) {
t.Fatal(err)
}
}

}

// TestContractVersionsResolve will test that the high lever interface used works.
Expand Down
4 changes: 0 additions & 4 deletions validation/gpo-params_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ func TestGasPriceOracleParams(t *testing.T) {
gasPriceOraclAddr := predeploys.GasPriceOracleAddr

checkPreEcotoneResourceConfig := func(t *testing.T, chain *ChainConfig, client *ethclient.Client) {

desiredParamsOuter, ok := GasPriceOracleParams[chain.Superchain]

if !ok {
Expand All @@ -56,11 +55,9 @@ func TestGasPriceOracleParams(t *testing.T) {
"scalar parameter %d out of bounds %d", actualParams.Scalar, desiredParams.Scalar.Bounds)

t.Logf("gas price oracle params are acceptable")

}

checkEcotoneResourceConfig := func(t *testing.T, chain *ChainConfig, client *ethclient.Client) {

desiredParamsOuter, ok := GasPriceOracleParams[chain.Superchain]

if !ok {
Expand All @@ -83,7 +80,6 @@ func TestGasPriceOracleParams(t *testing.T) {
"baseFeeScalar parameter %d out of bounds %d", actualParams.BaseFeeScalar, desiredParams.BaseFeeScalar.Bounds)

t.Logf("gas price oracle params are acceptable")

}

checkResourceConfig := func(t *testing.T, chain *ChainConfig, client *ethclient.Client) {
Expand Down
3 changes: 0 additions & 3 deletions validation/l2oo_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ import (
)

func TestL2OOParams(t *testing.T) {

isExcluded := map[uint64]bool{
10: true, // mainnet/op (old version of L2OutputOracle, no submissionInterval method)
291: true, // mainnet/orderly (old version of L2OutputOracle, no submissionInterval method)
Expand All @@ -42,7 +41,6 @@ func TestL2OOParams(t *testing.T) {

incorrectMsg := func(name string, want, got *big.Int) string {
return fmt.Sprintf("Incorrect %s, wanted %d got %d", name, want, got)

}

requireEqualParams := func(t *testing.T, desired, actual L2OOParams) {
Expand Down Expand Up @@ -90,7 +88,6 @@ func TestL2OOParams(t *testing.T) {
requireEqualParams(t, desiredParams, actualParams)

t.Logf("L2OutputOracle config params acceptable")

}

for chainID, chain := range OPChains {
Expand Down
1 change: 0 additions & 1 deletion validation/resource-config_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ func TestResourceConfig(t *testing.T) {
require.Equal(t, bindings.ResourceMeteringResourceConfig(OPMainnetResourceConfig), actualResourceConfig, "resource config unacceptable")

t.Logf("resource metering acceptable")

}

for chainID, chain := range OPChains {
Expand Down
3 changes: 0 additions & 3 deletions validation/superchain-version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,7 @@ var isSemverAcceptable = func(desired, actual string) bool {
}

func TestSuperchainWideContractVersions(t *testing.T) {

checkSuperchainTargetSatisfiesSemver := func(t *testing.T, superchain *Superchain) {

rpcEndpoint := superchain.Config.L1.PublicRPC
require.NotEmpty(t, rpcEndpoint)

Expand Down Expand Up @@ -53,7 +51,6 @@ func TestSuperchainWideContractVersions(t *testing.T) {
for superchainName, superchain := range Superchains {
t.Run(superchainName, func(t *testing.T) { checkSuperchainTargetSatisfiesSemver(t, superchain) })
}

}

func TestContractVersions(t *testing.T) {
Expand Down
1 change: 0 additions & 1 deletion validation/utils_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ var isWithinBounds = func(actual uint32, bounds [2]uint32) bool {
panic("bounds are in wrong order")
}
return (actual >= bounds[0] && actual <= bounds[1])

}

func TestAreCloseInts(t *testing.T) {
Expand Down

0 comments on commit 4bb6f5f

Please sign in to comment.