refactor: use t.TempDir() instead of os.MkdirTemp #240
Annotations
10 errors and 10 warnings
lint:
crypto/blake2b_test.go#L58
Error return value of `x.Read` is not checked (errcheck)
|
lint:
rpc/consensus_test.go#L86
Error return value of `server.ListenAndServe` is not checked (errcheck)
|
lint:
rpc/consensus_test.go#L87
Error return value of `node.Loop` is not checked (errcheck)
|
lint:
rpc/consensus_test.go#L666
Error return value of `pnode.Loop` is not checked (errcheck)
|
lint:
rpc/consensus_test.go#L669
Error return value of `server.ListenAndServe` is not checked (errcheck)
|
lint:
rpc/consensus_test.go#L850
Error return value of `server.ListenAndServe` is not checked (errcheck)
|
lint:
rpc/consensus_test.go#L851
Error return value of `node.Loop` is not checked (errcheck)
|
lint:
p2p/handle.go#L283
cognitive complexity 47 of func `parseNetworkMessage` is high (> 30) (gocognit)
|
lint:
storage/badger_work.go#L99
cognitive complexity 59 of func `(*BadgerStore).WriteRoundWork` is high (> 30) (gocognit)
|
lint:
storage/badger_transaction.go#L46
cognitive complexity 42 of func `(*BadgerStore).WriteTransaction` is high (> 30) (gocognit)
|
lint:
config/reader.go#L14
var-naming: const KernelNetworkId should be KernelNetworkID (revive)
|
lint:
util/base58/base58check_test.go#L61
redefines-builtin-id: redefinition of the built-in function len (revive)
|
lint:
crypto/rand.go#L10
unexported-return: exported func RandReader returns unexported type *crypto.randReader, which can be annoying to use (revive)
|
lint:
crypto/signature.go#L66
receiver-naming: receiver name publicKey should be consistent with previous receiver name privateKey for Key (revive)
|
lint:
crypto/blake2b_test.go#L18
unexported-return: exported func NewBlake2bXOF returns unexported type *crypto.xof, which can be annoying to use (revive)
|
lint:
crypto/signature.go#L81
receiver-naming: receiver name publicKey should be consistent with previous receiver name privateKey for Key (revive)
|
lint:
crypto/rand.go#L32
increment-decrement: should replace set[b] += 1 with set[b]++ (revive)
|
lint:
p2p/util.go#L39
var-naming: struct field Id should be ID (revive)
|
lint:
p2p/peer.go#L113
receiver-naming: receiver name p should be consistent with previous receiver name me for Peer (revive)
|
lint:
p2p/sync.go#L13
var-naming: method parameter nodeId should be nodeID (revive)
|