Skip to content

Commit cee200c

Browse files
committed
all: fix invalid directive syntax for golangci-lint nolint
1 parent 447b5f7 commit cee200c

File tree

10 files changed

+15
-14
lines changed

10 files changed

+15
-14
lines changed

accounts/keystore/passphrase_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func TestKeyEncryptDecrypt(t *testing.T) {
5353
t.Errorf("test %d: key address mismatch: have %x, want %x", i, key.Address, address)
5454
}
5555
// Recrypt with a new password and start over
56-
password += "new data appended" // nolint: gosec
56+
password += "new data appended" //nolint:gosec
5757
if keyjson, err = EncryptKey(key, password, veryLightScryptN, veryLightScryptP); err != nil {
5858
t.Errorf("test %d: failed to re-encrypt key %v", i, err)
5959
}

cmd/utils/diskusage.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ func getFreeDiskSpace(path string) (uint64, error) {
3333

3434
// Available blocks * size per block = available space in bytes
3535
var bavail = stat.Bavail
36-
// nolint:staticcheck
36+
//nolint:staticcheck
3737
if stat.Bavail < 0 {
3838
// FreeBSD can have a negative number of blocks available
3939
// because of the grace limit.

core/blockchain_insert.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ func (it *insertIterator) next() (*types.Block, error) {
136136
//
137137
// Both header and body validation errors (nil too) is cached into the iterator
138138
// to avoid duplicating work on the following next() call.
139-
// nolint:unused
139+
//nolint:unused
140140
func (it *insertIterator) peek() (*types.Block, error) {
141141
// If we reached the end of the chain, abort
142142
if it.index+1 >= len(it.chain) {

core/genesis_alloc.go

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

core/txpool/locals/tx_tracker_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -93,12 +93,12 @@ func (env *testEnv) close() {
9393
env.chain.Stop()
9494
}
9595

96-
// nolint:unused
96+
//nolint:unused
9797
func (env *testEnv) setGasTip(gasTip uint64) {
9898
env.pool.SetGasTip(new(big.Int).SetUint64(gasTip))
9999
}
100100

101-
// nolint:unused
101+
//nolint:unused
102102
func (env *testEnv) makeTx(nonce uint64, gasPrice *big.Int) *types.Transaction {
103103
if nonce == 0 {
104104
head := env.chain.CurrentHeader()
@@ -125,7 +125,7 @@ func (env *testEnv) makeTxs(n int) []*types.Transaction {
125125
return txs
126126
}
127127

128-
// nolint:unused
128+
//nolint:unused
129129
func (env *testEnv) commit() {
130130
head := env.chain.CurrentBlock()
131131
block := env.chain.GetBlock(head.Hash(), head.Number.Uint64())

crypto/blake2b/blake2b_generic.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ var precomputed = [10][16]byte{
2525
{10, 8, 7, 1, 2, 4, 6, 5, 15, 9, 3, 13, 11, 14, 12, 0},
2626
}
2727

28-
// nolint:unused
28+
//nolint:unused
2929
func hashBlocksGeneric(h *[8]uint64, c *[2]uint64, flag uint64, blocks []byte) {
3030
var m [16]uint64
3131
c0, c1 := c[0], c[1]

internal/build/gotool.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ func (g *GoToolchain) goTool(command string, args ...string) *exec.Cmd {
6666
if g.Root == "" {
6767
g.Root = runtime.GOROOT()
6868
}
69-
tool := exec.Command(filepath.Join(g.Root, "bin", "go"), command) // nolint: gosec
69+
tool := exec.Command(filepath.Join(g.Root, "bin", "go"), command) //nolint:gosec
7070
tool.Args = append(tool.Args, args...)
7171
tool.Env = append(tool.Env, "GOROOT="+g.Root)
7272

triedb/pathdb/history.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,7 +184,7 @@ func newStorageIdentQuery(address common.Address, addressHash common.Hash, stora
184184
// the addressHash denotes the address hash of the associated account;
185185
// the path denotes the path of the node within the trie;
186186
//
187-
// nolint:unused
187+
//nolint:unused
188188
func newTrienodeIdentQuery(addrHash common.Hash, path []byte) stateIdentQuery {
189189
return stateIdentQuery{
190190
stateIdent: newTrienodeIdent(addrHash, string(path)),

triedb/pathdb/history_trienode.go

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -643,7 +643,8 @@ func (r *trienodeHistoryReader) read(owner common.Hash, path string) ([]byte, er
643643
}
644644

645645
// writeTrienodeHistory persists the trienode history associated with the given diff layer.
646-
// nolint:unused
646+
//
647+
//nolint:unused
647648
func writeTrienodeHistory(writer ethdb.AncientWriter, dl *diffLayer) error {
648649
start := time.Now()
649650
h := newTrienodeHistory(dl.rootHash(), dl.parent.rootHash(), dl.block, dl.nodes.nodeOrigin)
@@ -670,7 +671,7 @@ func writeTrienodeHistory(writer ethdb.AncientWriter, dl *diffLayer) error {
670671
}
671672

672673
// readTrienodeMetadata resolves the metadata of the specified trienode history.
673-
// nolint:unused
674+
//nolint:unused
674675
func readTrienodeMetadata(reader ethdb.AncientReader, id uint64) (*trienodeMetadata, error) {
675676
header, err := rawdb.ReadTrienodeHistoryHeader(reader, id)
676677
if err != nil {

triedb/pathdb/iterator_binary.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -250,7 +250,7 @@ type accountBinaryIterator struct {
250250
// newBinaryAccountIterator creates a simplistic account iterator to step over
251251
// all the accounts in a slow, but easily verifiable way.
252252
//
253-
// nolint:all
253+
//nolint:all
254254
func (dl *diskLayer) newBinaryAccountIterator(seek common.Hash) AccountIterator {
255255
return &accountBinaryIterator{
256256
binaryIterator: dl.initBinaryAccountIterator(seek),
@@ -317,7 +317,7 @@ type storageBinaryIterator struct {
317317
// newBinaryStorageIterator creates a simplistic account iterator to step over
318318
// all the storage slots in a slow, but easily verifiable way.
319319
//
320-
// nolint:all
320+
//nolint:all
321321
func (dl *diskLayer) newBinaryStorageIterator(account common.Hash, seek common.Hash) StorageIterator {
322322
return &storageBinaryIterator{
323323
binaryIterator: dl.initBinaryStorageIterator(account, seek),

0 commit comments

Comments
 (0)