Skip to content

Commit

Permalink
fix: nolint
Browse files Browse the repository at this point in the history
  • Loading branch information
notanatol committed Feb 26, 2024
1 parent 8c267be commit 150f00b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ issues:
- linters:
- goheader
text: "go-ethereum Authors" ## disable check for other authors
- path: _test\.go
- path: '(.+)_test\.go'
linters:
- goconst ## temporally disable goconst in test
- linters:
Expand Down
1 change: 1 addition & 0 deletions pkg/crypto/crypto.go
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ func NewEthereumAddress(p ecdsa.PublicKey) ([]byte, error) {
if p.X == nil || p.Y == nil {
return nil, errors.New("invalid public key")
}
// nolint:staticcheck
pubBytes := elliptic.Marshal(btcec.S256(), p.X, p.Y)
pubHash, err := LegacyKeccak256(pubBytes[1:])
if err != nil {
Expand Down
1 change: 1 addition & 0 deletions pkg/keystore/file/key.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,7 @@ func encryptKey(k *ecdsa.PrivateKey, password string, edg keystore.EDG) ([]byte,
}
addr = a
case elliptic.P256():
// nolint:staticcheck
addr = elliptic.Marshal(elliptic.P256(), k.PublicKey.X, k.PublicKey.Y)
default:
return nil, fmt.Errorf("unsupported curve: %v", k.PublicKey.Curve)
Expand Down
1 change: 1 addition & 0 deletions pkg/storage/storagetest/transaction.go
Original file line number Diff line number Diff line change
Expand Up @@ -281,6 +281,7 @@ func TestTxStore(t *testing.T, store storage.TxStore) {

tx := store.NewTx(storage.NewTxState(ctx))

// nolint:goconst
objects := []*object{
{id: "0001" + tCase.name, data: []byte("data1")},
{id: "0002" + tCase.name, data: []byte("data2")},
Expand Down

0 comments on commit 150f00b

Please sign in to comment.