Skip to content

Commit

Permalink
Fix Linter (#30)
Browse files Browse the repository at this point in the history
Fix linter
  • Loading branch information
ToniRamirezM authored Mar 14, 2024
1 parent b5c603f commit 063f395
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 4 deletions.
31 changes: 31 additions & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
---
run:
timeout: 5m
skip-dirs:
- test


linters:
enable:
- whitespace
- gosec
- gci
- misspell
- gomnd
- gofmt
- goimports
- revive
- unconvert

linters-settings:
revive:
rules:
- name: exported
arguments:
- disableStutteringCheck

issues:
include:
- EXC0012 # EXC0012 revive: Annoying issue about not having a comment. The rare codebase has such comments
- EXC0014 # EXC0014 revive: Annoying issue about not having a comment. The rare codebase has such comments

2 changes: 1 addition & 1 deletion ethtxmanager/ethtxmanager.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ func pendingL1Txs(URL string, from common.Address, httpHeaders map[string]string
return nil, fmt.Errorf("failed to convert gasPrice %v to big.Int", tx.GasPrice)
}

data := common.Hex2Bytes(string(tx.Data))
data := common.Hex2Bytes(tx.Data)

mTx := monitoredTx{
ID: types.NewTx(&types.LegacyTx{To: &to, Nonce: nonce.Uint64(), Value: value, Data: data}).Hash(),
Expand Down
2 changes: 1 addition & 1 deletion ethtxmanager/memstorage.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ type MemStorage struct {
PersistenceFilename string
}

// NewPostgresStorage creates a new instance of storage
// NewMemStorage creates a new instance of storage
func NewMemStorage(persistenceFilename string) *MemStorage {
transactions := make(map[common.Hash]monitoredTx)
if persistenceFilename != "" {
Expand Down
4 changes: 2 additions & 2 deletions ethtxmanager/rpcclient.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,12 @@ type Response struct {
Result json.RawMessage
}

// Client defines typed wrappers for the zkEVM RPC API.
// RPCClient is a client to interact with the Ethereum JSON RPC Server
type RPCClient struct {
url string
}

// NewClient creates an instance of client
// NewRPCClient creates an instance of client
func NewRPCClient(url string) *RPCClient {
return &RPCClient{
url: url,
Expand Down

0 comments on commit 063f395

Please sign in to comment.