Preparing report...

Report for github.com/ngchain/ngcore

A+    Excellent!    Found 36 issues across 125 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


go_vet100%

go vet examines Go source code and reports suspicious constructs, such as Printf calls whose arguments do not align with the format string.

No problems detected. Good job!


gocyclo94%

Gocyclo calculates cyclomatic complexities of functions in Go source code. The cyclomatic complexity of a function is calculated according to the following rules: 1 is the base complexity of a function +1 for each 'if', 'for', 'case', '&&' or '||' Go Report Card warns on functions with cyclomatic complexity > 15.


golint76%

Golint is a linter for Go source code.

    • ngcore/ngtypes/account_json.go
    • Line 17: warning: exported method Account.MarshalJSON should have comment or be unexported (golint)
    • Line 27: warning: exported method Account.UnmarshalJSON should have comment or be unexported (golint)
    • ngcore/ngtypes/account.go
    • Line 5: warning: exported type AccountNum should have comment or be unexported (golint)
    • Line 7: warning: exported method AccountNum.Bytes should have comment or be unexported (golint)
    • Line 13: warning: exported function NewNumFromBytes should have comment or be unexported (golint)
    • ngcore/utils/locker.go
    • Line 9: warning: exported type Locker should have comment or be unexported (golint)
    • Line 13: warning: exported function NewLocker should have comment or be unexported (golint)
    • Line 17: warning: exported method Locker.Lock should have comment or be unexported (golint)
    • Line 23: warning: exported method Locker.Unlock should have comment or be unexported (golint)
    • Line 29: warning: exported method Locker.IsLocked should have comment or be unexported (golint)
    • ngcore/consensus/pow.go
    • Line 42: warning: exported type PoWorkConfig should have comment or be unexported (golint)
    • Line 79: warning: comment on exported method PoWork.UpdateMiningThread should be of the form "UpdateMiningThread ..." (golint)
    • Line 223: warning: exported method PoWork.ImportBlock should have comment or be unexported (golint)
    • ngcore/ngp2p/main.go
    • Line 35: warning: exported type P2PConfig should have comment or be unexported (golint)
    • Line 95: warning: exported method LocalNode.GoServe should have comment or be unexported (golint)
    • ngcore/ngblocks/put.go
    • Line 47: warning: exported function PutTxs should have comment or be unexported (golint)
    • Line 65: warning: exported function PutBlock should have comment or be unexported (golint)
    • Line 84: warning: exported function PutLatestTags should have comment or be unexported (golint)
    • ngcore/ngtypes/tx_json.go
    • Line 26: warning: exported method Tx.MarshalJSON should have comment or be unexported (golint)
    • Line 53: warning: exported method Tx.UnmarshalJSON should have comment or be unexported (golint)
    • ngcore/ngpool/pool.go
    • Line 29: warning: exported function Init should have comment or be unexported (golint)
    • Line 53: warning: comment on exported method TxPool.Reset should be of the form "Reset ..." (golint)
    • ngcore/ngchain/chain.go
    • Line 13: warning: exported type Chain should have comment or be unexported (golint)
    • Line 22: warning: exported function Init should have comment or be unexported (golint)
    • ngcore/ngtypes/address.go
    • Line 42: warning: exported function NewAddressFromBS58 should have comment or be unexported (golint)
    • Line 56: warning: exported method Address.BS58 should have comment or be unexported (golint)
    • Line 64: warning: exported method Address.MarshalJSON should have comment or be unexported (golint)
    • Line 70: warning: exported method Address.UnmarshalJSON should have comment or be unexported (golint)
    • ngcore/ngtypes/block_json.go
    • Line 31: warning: exported method Block.MarshalJSON should have comment or be unexported (golint)
    • Line 48: warning: exported method Block.UnmarshalJSON should have comment or be unexported (golint)
    • ngcore/ngp2p/broadcast/broadcast.go
    • Line 14: warning: exported type Broadcast should have comment or be unexported (golint)
    • Line 31: warning: exported function NewBroadcastProtocol should have comment or be unexported (golint)
    • Line 76: warning: exported method Broadcast.GoServe should have comment or be unexported (golint)
    • ngcore/ngp2p/defaults/defaults.go
    • Line 21: warning: exported function GetWiredProtocol should have comment or be unexported (golint)
    • Line 25: warning: exported function GetDHTProtocolExtension should have comment or be unexported (golint)
    • Line 29: warning: exported function GetBroadcastBlockTopic should have comment or be unexported (golint)
    • Line 33: warning: exported function GetBroadcastTxTopic should have comment or be unexported (golint)
    • ngcore/ngtypes/reward_curve.go
    • Line 18: warning: exported var RegisterFee should have comment or be unexported (golint)
    • Line 23: warning: comment on exported function GetBlockReward should be of the form "GetBlockReward ..." (golint)
    • ngcore/ngp2p/wired/wired.go
    • Line 33: warning: exported function NewWiredProtocol should have comment or be unexported (golint)
    • Line 46: warning: exported method Wired.GetWiredProtocol should have comment or be unexported (golint)
    • Line 50: warning: exported method Wired.GoServe should have comment or be unexported (golint)
    • ngcore/ngtypes/defaults.go
    • Line 75: warning: exported function GetGenesisGenerateTxSignature should have comment or be unexported (golint)
    • Line 90: warning: exported function GetGenesisBlockNonce should have comment or be unexported (golint)
    • Line 105: warning: comment on exported function GetGenesisTimestamp should be of the form "GetGenesisTimestamp ..." (golint)
    • ngcore/ngblocks/get.go
    • Line 12: warning: exported function GetTxByHash should have comment or be unexported (golint)
    • Line 37: warning: exported function GetBlockByHash should have comment or be unexported (golint)
    • Line 59: warning: exported function GetBlockByHeight should have comment or be unexported (golint)
    • Line 90: warning: exported function GetLatestHeight should have comment or be unexported (golint)
    • Line 107: warning: exported function GetLatestHash should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words