From 150f00b312315a97e4c11eb8491e3a5255f77ce2 Mon Sep 17 00:00:00 2001 From: notanatol Date: Mon, 26 Feb 2024 09:57:42 -0600 Subject: [PATCH] fix: nolint --- .golangci.yml | 2 +- pkg/crypto/crypto.go | 1 + pkg/keystore/file/key.go | 1 + pkg/storage/storagetest/transaction.go | 1 + 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.golangci.yml b/.golangci.yml index 04152e8d201..31e8e8d6df0 100644 --- a/.golangci.yml +++ b/.golangci.yml @@ -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: diff --git a/pkg/crypto/crypto.go b/pkg/crypto/crypto.go index a2e0ba2e468..c93b18b439d 100644 --- a/pkg/crypto/crypto.go +++ b/pkg/crypto/crypto.go @@ -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 { diff --git a/pkg/keystore/file/key.go b/pkg/keystore/file/key.go index fbec230f942..e16b936900c 100644 --- a/pkg/keystore/file/key.go +++ b/pkg/keystore/file/key.go @@ -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) diff --git a/pkg/storage/storagetest/transaction.go b/pkg/storage/storagetest/transaction.go index 1275bedb7d9..86fa5575f16 100644 --- a/pkg/storage/storagetest/transaction.go +++ b/pkg/storage/storagetest/transaction.go @@ -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")},