Skip to content

chore: add go linting #9

chore: add go linting

chore: add go linting #9

Triggered via pull request January 9, 2024 09:26
Status Failure
Total duration 1m 21s
Artifacts

lint-go.yaml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 1 warning
golangci-lint: p2psrv/rpc/rpc.go#L157
only one cuddle assignment allowed before if statement (wsl)
golangci-lint: p2psrv/rpc/rpc.go#L160
return statements should not be cuddled if block has more than two lines (wsl)
golangci-lint: cmd/thor/utils.go#L452
only one cuddle assignment allowed before if statement (wsl)
golangci-lint: cmd/thor/utils.go#L529
Addr, DisableGeneralOptionsHandler, TLSConfig, ReadTimeout, WriteTimeout, IdleTimeout, MaxHeaderBytes, TLSNextProto, ConnState, ErrorLog, BaseContext, ConnContext are missing in Server (exhaustivestruct)
golangci-lint: txpool/blocklist.go#L33
err113: do not define dynamic errors, use wrapped static errors instead: "fmt.Errorf(\"the path [%v] does not exist\", path)" (goerr113)
golangci-lint: txpool/tx_pool.go#L187
mnd: Magic number: 121, in <argument> detected (gomnd)
golangci-lint: txpool/tx_pool.go#L189
mnd: Magic number: 90, in <argument> detected (gomnd)
golangci-lint: comm/peer.go#L85
mnd: Magic number: 91, in <argument> detected (gomnd)
golangci-lint: comm/peer.go#L92
mnd: Magic number: 10, in <operation> detected (gomnd)
golangci-lint: comm/peer.go#L88
return with no blank line before (nlreturn)
golangci-lint: cmd/thor/utils.go#L208
errorf: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (revive)