diff --git a/accounts/abi/bind/backends/simulated_test.go b/accounts/abi/bind/backends/simulated_test.go index ccdbc582a7..24b2c4ef0f 100644 --- a/accounts/abi/bind/backends/simulated_test.go +++ b/accounts/abi/bind/backends/simulated_test.go @@ -39,7 +39,7 @@ import ( func TestSimulatedBackend(t *testing.T) { t.Parallel() var gasLimit uint64 = 8000029 - key, _ := crypto.GenerateKey() // nolint: gosec + key, _ := crypto.GenerateKey() //nolint:gosec auth, _ := bind.NewKeyedTransactorWithChainID(key, big.NewInt(1337)) genAlloc := make(types.GenesisAlloc) genAlloc[auth.From] = types.Account{Balance: big.NewInt(9223372036854775807)} diff --git a/accounts/keystore/passphrase_test.go b/accounts/keystore/passphrase_test.go index 798e8341ec..c9c12cba54 100644 --- a/accounts/keystore/passphrase_test.go +++ b/accounts/keystore/passphrase_test.go @@ -53,7 +53,7 @@ func TestKeyEncryptDecrypt(t *testing.T) { t.Errorf("test %d: key address mismatch: have %x, want %x", i, key.Address, address) } // Recrypt with a new password and start over - password += "new data appended" // nolint: gosec + password += "new data appended" //nolint:gosec if keyjson, err = EncryptKey(key, password, veryLightScryptN, veryLightScryptP); err != nil { t.Errorf("test %d: failed to re-encrypt key %v", i, err) } diff --git a/crypto/blake2b/blake2b_generic.go b/crypto/blake2b/blake2b_generic.go index 4d3f69d292..d3c398a2aa 100644 --- a/crypto/blake2b/blake2b_generic.go +++ b/crypto/blake2b/blake2b_generic.go @@ -25,7 +25,7 @@ var precomputed = [10][16]byte{ {10, 8, 7, 1, 2, 4, 6, 5, 15, 9, 3, 13, 11, 14, 12, 0}, } -// nolint:unused +//nolint:unused func hashBlocksGeneric(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) { var m [16]uint64 c0, c1 := c[0], c[1] diff --git a/internal/build/gotool.go b/internal/build/gotool.go index 2c7fad2ce3..568a214f21 100644 --- a/internal/build/gotool.go +++ b/internal/build/gotool.go @@ -66,7 +66,7 @@ func (g *GoToolchain) goTool(command string, args ...string) *exec.Cmd { if g.Root == "" { g.Root = runtime.GOROOT() } - tool := exec.Command(filepath.Join(g.Root, "bin", "go"), command) // nolint: gosec + tool := exec.Command(filepath.Join(g.Root, "bin", "go"), command) //nolint:gosec tool.Args = append(tool.Args, args...) tool.Env = append(tool.Env, "GOROOT="+g.Root) diff --git a/trie/nodeset.go b/trie/nodeset.go index 1bab68cd6f..236bc38aec 100644 --- a/trie/nodeset.go +++ b/trie/nodeset.go @@ -35,18 +35,21 @@ type memoryNode struct { // memoryNodeSize is the raw size of a memoryNode data structure without any // node data included. It's an approximate size, but should be a lot better // than not counting them. -// nolint:unused +// +//nolint:unused var memoryNodeSize = int(reflect.TypeOf(memoryNode{}).Size()) // memorySize returns the total memory size used by this node. -// nolint:unused +// +//nolint:unused func (n *memoryNode) memorySize(key int) int { return int(n.size) + memoryNodeSize + key } // rlp returns the raw rlp encoded blob of the cached trie node, either directly // from the cache, or by regenerating it from the collapsed node. -// nolint:unused +// +//nolint:unused func (n *memoryNode) rlp() []byte { if node, ok := n.node.(rawNode); ok { return node @@ -56,7 +59,8 @@ func (n *memoryNode) rlp() []byte { // obj returns the decoded and expanded trie node, either directly from the cache, // or by regenerating it from the rlp encoded blob. -// nolint:unused +// +//nolint:unused func (n *memoryNode) obj() node { if node, ok := n.node.(rawNode); ok { return mustDecodeNode(n.hash[:], node) @@ -71,14 +75,14 @@ type nodeWithPrev struct { } // unwrap returns the internal memoryNode object. -// nolint:unused +//nolint:unused func (n *nodeWithPrev) unwrap() *memoryNode { return n.memoryNode } // memorySize returns the total memory size used by this node. It overloads // the function in memoryNode by counting the size of previous value as well. -// nolint: unused +//nolint: unused func (n *nodeWithPrev) memorySize(key int) int { return n.memoryNode.memorySize(key) + len(n.prev) }