Preparing report...

Report for github.com/chain/chain

A+    Excellent!    Found 135 issues across 421 files

Tweet

gofmt95%

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


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!


gocyclo95%

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.

    • chain/core/api_test.go
    • Line 28: warning: cyclomatic complexity 20 of function TestBuildFinal() is high (> 15) (gocyclo)
    • Line 201: warning: cyclomatic complexity 19 of function TestTransfer() is high (> 15) (gocyclo)
    • chain/exp/ivy/compiler/compile.go
    • Line 434: warning: cyclomatic complexity 52 of function compileExpr() is high (> 15) (gocyclo)
    • Line 297: warning: cyclomatic complexity 29 of function compileClause() is high (> 15) (gocyclo)
    • Line 172: warning: cyclomatic complexity 24 of function compileContract() is high (> 15) (gocyclo)
    • Line 51: warning: cyclomatic complexity 17 of function Compile() is high (> 15) (gocyclo)
    • chain/protocol/validation/validation.go
    • Line 59: warning: cyclomatic complexity 79 of function checkValid() is high (> 15) (gocyclo)
    • Line 324: warning: cyclomatic complexity 19 of function checkValidSrc() is high (> 15) (gocyclo)
    • Line 389: warning: cyclomatic complexity 18 of function checkValidDest() is high (> 15) (gocyclo)
    • Line 456: warning: cyclomatic complexity 16 of function ValidateBlock() is high (> 15) (gocyclo)

golint75%

Golint is a linter for Go source code.

    • chain/protocol/bc/legacy/txinput.go
    • Line 13: warning: exported type TxInput should have comment or be unexported (golint)
    • Line 24: warning: exported type TypedInput should have comment or be unexported (golint)
    • Line 31: warning: exported method TxInput.AssetAmount should have comment or be unexported (golint)
    • Line 43: warning: exported method TxInput.AssetID should have comment or be unexported (golint)
    • Line 51: warning: exported method TxInput.Amount should have comment or be unexported (golint)
    • Line 59: warning: exported method TxInput.ControlProgram should have comment or be unexported (golint)
    • Line 66: warning: exported method TxInput.IssuanceProgram should have comment or be unexported (golint)
    • Line 73: warning: exported method TxInput.Arguments should have comment or be unexported (golint)
    • Line 83: warning: exported method TxInput.SetArguments should have comment or be unexported (golint)
    • Line 234: warning: exported method TxInput.WriteInputCommitment should have comment or be unexported (golint)
    • Line 304: warning: exported method TxInput.SpentOutputID should have comment or be unexported (golint)
    • chain/protocol/bc/legacy/txoutput.go
    • Line 14: warning: exported type TxOutput should have comment or be unexported (golint)
    • Line 25: warning: exported function NewTxOutput should have comment or be unexported (golint)
    • Line 86: warning: exported method TxOutput.WriteCommitment should have comment or be unexported (golint)
    • Line 90: warning: exported method TxOutput.CommitmentHash should have comment or be unexported (golint)
    • chain/core/mockhsm/mockhsm.go
    • Line 25: warning: exported var ErrDuplicateKeyAlias should have comment or be unexported (golint)
    • Line 32: warning: exported type HSM should have comment or be unexported (golint)
    • Line 40: warning: exported type XPub should have comment or be unexported (golint)
    • Line 45: warning: exported type Pub should have comment or be unexported (golint)
    • Line 50: warning: exported function New should have comment or be unexported (golint)
    • Line 233: warning: exported method HSM.DeleteChainKDKey should have comment or be unexported (golint)
    • chain/core/account/builder.go
    • Line 16: warning: exported method Manager.NewSpendAction should have comment or be unexported (golint)
    • Line 26: warning: exported method Manager.DecodeSpendAction should have comment or be unexported (golint)
    • Line 97: warning: exported method Manager.NewSpendUTXOAction should have comment or be unexported (golint)
    • Line 104: warning: exported method Manager.DecodeSpendUTXOAction should have comment or be unexported (golint)
    • Line 165: warning: exported method Manager.NewControlAction should have comment or be unexported (golint)
    • Line 174: warning: exported method Manager.DecodeControlAction should have comment or be unexported (golint)
    • chain/core/txbuilder/actions.go
    • Line 15: warning: exported function DecodeControlReceiverAction should have comment or be unexported (golint)
    • Line 51: warning: exported function DecodeControlProgramAction should have comment or be unexported (golint)
    • Line 79: warning: exported function DecodeSetTxRefDataAction should have comment or be unexported (golint)
    • Line 96: warning: exported function DecodeRetireAction should have comment or be unexported (golint)
    • chain/net/http/authz/authorizer.go
    • Line 13: warning: exported var ErrNotAuthorized should have comment or be unexported (golint)
    • Line 20: warning: exported type Authorizer should have comment or be unexported (golint)
    • Line 25: warning: exported function NewAuthorizer should have comment or be unexported (golint)
    • Line 32: warning: exported method Authorizer.Authorize should have comment or be unexported (golint)
    • chain/protocol/prottest/block.go
    • Line 25: warning: exported type Option should have comment or be unexported (golint)
    • Line 27: warning: exported function WithStore should have comment or be unexported (golint)
    • Line 31: warning: exported function WithOutputIDs should have comment or be unexported (golint)
    • Line 39: warning: exported function WithBlockSigners should have comment or be unexported (golint)
    • chain/core/asset/asset.go
    • Line 32: warning: exported var ErrDuplicateAlias should have comment or be unexported (golint)
    • Line 36: warning: exported function NewRegistry should have comment or be unexported (golint)
    • Line 63: warning: exported method Registry.IndexAssets should have comment or be unexported (golint)
    • Line 67: warning: exported type Asset should have comment or be unexported (golint)
    • Line 80: warning: exported method Asset.Definition should have comment or be unexported (golint)
    • Line 90: warning: exported method Asset.RawDefinition should have comment or be unexported (golint)
    • Line 94: warning: exported method Asset.SetDefinition should have comment or be unexported (golint)
    • chain/protocol/vm/vm.go
    • Line 43: warning: exported function Verify should have comment or be unexported (golint)
    • Line 219: warning: exported type Error should have comment or be unexported (golint)
    • chain/core/query/outputs.go
    • Line 22: warning: exported type OutputsAfter should have comment or be unexported (golint)
    • Line 32: warning: exported function DecodeOutputsAfter should have comment or be unexported (golint)
    • Line 50: warning: exported method Indexer.Outputs should have comment or be unexported (golint)
    • chain/core/config/config.go
    • Line 35: warning: exported const GrantPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 39: warning: exported var ErrBadGenerator should have comment or be unexported (golint)
    • Line 47: warning: exported var BuildCommit should have its own declaration (golint)
    • Line 49: warning: comment on exported var BuildConfig should be of the form "BuildConfig ..." (golint)
    • Line 183: warning: comment on exported function CheckConfigExists should be of the form "CheckConfigExists ..." (golint)
    • chain/encoding/json/json.go
    • Line 8: warning: exported type HexBytes should have comment or be unexported (golint)
    • Line 10: warning: exported method HexBytes.MarshalText should have comment or be unexported (golint)
    • Line 14: warning: exported method HexBytes.UnmarshalText should have comment or be unexported (golint)
    • Line 21: warning: exported type Map should have comment or be unexported (golint)
    • Line 23: warning: exported method Map.MarshalJSON should have comment or be unexported (golint)
    • Line 27: warning: exported method Map.UnmarshalJSON should have comment or be unexported (golint)
    • chain/protocol/bc/asset.go
    • Line 14: warning: exported function NewAssetID should have comment or be unexported (golint)
    • Line 18: warning: exported method AssetID.Byte32 should have comment or be unexported (golint)
    • Line 19: warning: exported method AssetID.MarshalText should have comment or be unexported (golint)
    • Line 20: warning: exported method AssetID.UnmarshalText should have comment or be unexported (golint)
    • Line 21: warning: exported method AssetID.UnmarshalJSON should have comment or be unexported (golint)
    • Line 22: warning: exported method AssetID.Bytes should have comment or be unexported (golint)
    • Line 23: warning: exported method AssetID.Value should have comment or be unexported (golint)
    • Line 24: warning: exported method AssetID.Scan should have comment or be unexported (golint)
    • Line 25: warning: exported method AssetID.WriteTo should have comment or be unexported (golint)
    • Line 26: warning: exported method AssetID.ReadFrom should have comment or be unexported (golint)
    • Line 27: warning: exported method AssetID.IsZero should have comment or be unexported (golint)
    • Line 29: warning: exported method AssetDefinition.ComputeAssetID should have comment or be unexported (golint)
    • Line 38: warning: exported function ComputeAssetID should have comment or be unexported (golint)
    • Line 50: warning: exported method AssetAmount.ReadFrom should have comment or be unexported (golint)
    • Line 61: warning: exported method AssetAmount.WriteTo should have comment or be unexported (golint)
    • Line 70: warning: exported method AssetAmount.Equal should have comment or be unexported (golint)
    • chain/core/coretest/fixtures.go
    • Line 21: warning: exported function CreatePins should have comment or be unexported (golint)
    • Line 37: warning: exported function CreateAccount should have comment or be unexported (golint)
    • Line 46: warning: exported function CreateAsset should have comment or be unexported (golint)
    • Line 55: warning: exported function IssueAssets should have comment or be unexported (golint)
    • Line 78: warning: exported function Transfer should have comment or be unexported (golint)
    • Line 95: warning: context.Context should be the first parameter of a function (golint)
    • Line 95: warning: exported function SignTxTemplate should have comment or be unexported (golint)
    • chain/core/account/accounts.go
    • Line 28: warning: exported var ErrDuplicateAlias should have comment or be unexported (golint)
    • Line 32: warning: exported function NewManager should have comment or be unexported (golint)
    • Line 64: warning: exported method Manager.IndexAccounts should have comment or be unexported (golint)
    • Line 86: warning: exported type Account should have comment or be unexported (golint)
    • chain/crypto/ed25519/ecmath/point.go
    • Line 72: warning: exported method Point.Encode should have comment or be unexported (golint)
    • Line 78: warning: exported method Point.Decode should have comment or be unexported (golint)
    • Line 83: warning: exported method Point.ConstTimeEqual should have comment or be unexported (golint)
    • chain/protocol/vm/vmutil/script.go
    • Line 10: warning: exported var ErrBadValue should have comment or be unexported (golint)
    • Line 14: warning: exported function IsUnspendable should have comment or be unexported (golint)
    • Line 37: warning: exported function ParseBlockMultiSigProgram should have comment or be unexported (golint)
    • Line 76: warning: exported function P2SPMultiSigProgram should have comment or be unexported (golint)
    • Line 97: warning: exported function ParseP2SPMultiSigProgram should have comment or be unexported (golint)
    • chain/core/query/annotated.go
    • Line 17: warning: exported type AnnotatedTx should have comment or be unexported (golint)
    • Line 30: warning: exported type AnnotatedInput should have comment or be unexported (golint)
    • Line 48: warning: exported type AnnotatedOutput should have comment or be unexported (golint)
    • Line 68: warning: exported type AnnotatedAccount should have comment or be unexported (golint)
    • Line 76: warning: exported type AccountKey should have comment or be unexported (golint)
    • Line 82: warning: exported type AnnotatedAsset should have comment or be unexported (golint)
    • Line 93: warning: exported type AssetKey should have comment or be unexported (golint)
    • Line 99: warning: exported type Bool should have comment or be unexported (golint)
    • Line 101: warning: exported method Bool.MarshalJSON should have comment or be unexported (golint)
    • Line 108: warning: exported method Bool.UnmarshalJSON should have comment or be unexported (golint)
    • chain/protocol/vm/ops.go
    • Line 12: warning: exported type Op should have comment or be unexported (golint)
    • Line 18: warning: exported type Instruction should have comment or be unexported (golint)
    • Line 25: warning: exported const OP_FALSE should have comment (or a comment on this block) or be unexported (golint)
    • Line 26: warning: don't use underscores in Go names; const OP_0 should be OP0 (golint)
    • Line 28: warning: don't use underscores in Go names; const OP_1 should be OP1 (golint)
    • Line 31: warning: don't use underscores in Go names; const OP_2 should be OP2 (golint)
    • Line 32: warning: don't use underscores in Go names; const OP_3 should be OP3 (golint)
    • Line 33: warning: don't use underscores in Go names; const OP_4 should be OP4 (golint)
    • Line 34: warning: don't use underscores in Go names; const OP_5 should be OP5 (golint)
    • Line 35: warning: don't use underscores in Go names; const OP_6 should be OP6 (golint)
    • Line 36: warning: don't use underscores in Go names; const OP_7 should be OP7 (golint)
    • Line 37: warning: don't use underscores in Go names; const OP_8 should be OP8 (golint)
    • Line 38: warning: don't use underscores in Go names; const OP_9 should be OP9 (golint)
    • Line 447: warning: exported function ParseProgram should have comment or be unexported (golint)
    • chain/core/query/filter/sql.go
    • Line 90: warning: exported type SQLType should have comment or be unexported (golint)
    • Line 93: warning: exported const SQLBool should have comment (or a comment on this block) or be unexported (golint)
    • Line 102: warning: exported type SQLTable should have comment or be unexported (golint)
    • Line 109: warning: exported type SQLColumn should have comment or be unexported (golint)
    • Line 115: warning: exported type SQLForeignKey should have comment or be unexported (golint)
    • chain/core/account/indexer.go
    • Line 40: warning: exported function Annotated should have comment or be unexported (golint)
    • Line 101: warning: exported method Manager.ProcessBlocks should have comment or be unexported (golint)
    • chain/core/txfeed/txfeed.go
    • Line 14: warning: exported var ErrDuplicateAlias should have comment or be unexported (golint)
    • Line 16: warning: exported type Tracker should have comment or be unexported (golint)
    • Line 20: warning: exported type TxFeed should have comment or be unexported (golint)
    • Line 27: warning: exported method Tracker.Create should have comment or be unexported (golint)
    • Line 111: warning: exported method Tracker.Find should have comment or be unexported (golint)
    • Line 149: warning: exported method Tracker.Delete should have comment or be unexported (golint)
    • Line 178: warning: exported method Tracker.Update should have comment or be unexported (golint)
    • chain/protocol/bc/legacy/spend.go
    • Line 25: warning: exported method SpendInput.IsIssuance should have comment or be unexported (golint)
    • Line 27: warning: exported function NewSpendInput should have comment or be unexported (golint)
    • Line 143: warning: exported method SpendCommitment.Hash should have comment or be unexported (golint)
    • chain/protocol/vm/pushdata.go
    • Line 35: warning: exported function PushdataBytes should have comment or be unexported (golint)
    • Line 56: warning: exported function PushdataInt64 should have comment or be unexported (golint)
    • chain/encoding/blockchain/blockchain.go
    • Line 17: warning: exported var ErrRange should have comment or be unexported (golint)
    • Line 62: warning: exported function ReadVarint31 should have comment or be unexported (golint)
    • Line 73: warning: exported function ReadVarint63 should have comment or be unexported (golint)
    • Line 84: warning: exported function ReadVarstr31 should have comment or be unexported (golint)
    • Line 139: warning: exported function WriteVarint31 should have comment or be unexported (golint)
    • Line 150: warning: exported function WriteVarint63 should have comment or be unexported (golint)
    • Line 161: warning: exported function WriteVarstr31 should have comment or be unexported (golint)
    • chain/protocol/bc/spend.go
    • Line 17: warning: exported method Spend.SetDestination should have comment or be unexported (golint)
    • Line 34: warning: exported method Spend.SetAnchored should have comment or be unexported (golint)
    • chain/protocol/bc/hash.go
    • Line 17: warning: exported var EmptyStringHash should have comment or be unexported (golint)
    • Line 19: warning: exported function NewHash should have comment or be unexported (golint)
    • Line 27: warning: exported method Hash.Byte32 should have comment or be unexported (golint)
    • Line 74: warning: exported method Hash.Bytes should have comment or be unexported (golint)
    • chain/core/authz.go
    • Line 3: warning: exported const GrantPrefix should have comment or be unexported (golint)
    • Line 5: warning: exported var Policies should have comment or be unexported (golint)
    • chain/protocol/bc/legacy/block_header.go
    • Line 47: warning: exported method BlockHeader.Scan should have comment or be unexported (golint)
    • Line 58: warning: exported method BlockHeader.Value should have comment or be unexported (golint)
    • Line 149: warning: exported method BlockHeader.WriteTo should have comment or be unexported (golint)
    • chain/protocol/vm/types.go
    • Line 7: warning: exported function BoolBytes should have comment or be unexported (golint)
    • Line 14: warning: exported function AsBool should have comment or be unexported (golint)
    • Line 23: warning: exported function Int64Bytes should have comment or be unexported (golint)
    • Line 37: warning: exported function AsInt64 should have comment or be unexported (golint)
    • chain/crypto/ed25519/chainkd/chainkd.go
    • Line 15: warning: comment on exported type XPrv should be of the form "XPrv ..." (with optional leading article) (golint)
    • Line 17: warning: exported type XPub should have comment or be unexported (golint)
    • Line 41: warning: exported method XPrv.XPub should have comment or be unexported (golint)
    • Line 56: warning: exported method XPrv.Child should have comment or be unexported (golint)
    • Line 83: warning: exported method XPub.Child should have comment or be unexported (golint)
    • Line 116: warning: exported method XPrv.Derive should have comment or be unexported (golint)
    • Line 124: warning: exported method XPub.Derive should have comment or be unexported (golint)
    • Line 132: warning: exported method XPrv.Sign should have comment or be unexported (golint)
    • Line 177: warning: exported method XPub.Verify should have comment or be unexported (golint)
    • chain/core/query/transactions.go
    • Line 16: warning: exported var ErrBadAfter should have comment or be unexported (golint)
    • Line 20: warning: exported type TxAfter should have comment or be unexported (golint)
    • Line 39: warning: exported function DecodeTxAfter should have comment or be unexported (golint)
    • Line 53: warning: exported function ValidateTransactionFilter should have comment or be unexported (golint)
    • chain/core/txbuilder/types.go
    • Line 33: warning: exported method Template.Hash should have comment or be unexported (golint)
    • Line 43: warning: exported method SigningInstruction.UnmarshalJSON should have comment or be unexported (golint)
    • Line 67: warning: exported type Action should have comment or be unexported (golint)
    • chain/crypto/ed25519/internal/edwards25519/edwards25519.go
    • Line 19: warning: exported function FeZero should have comment or be unexported (golint)
    • Line 23: warning: exported function FeOne should have comment or be unexported (golint)
    • Line 28: warning: exported function FeAdd should have comment or be unexported (golint)
    • Line 41: warning: exported function FeSub should have comment or be unexported (golint)
    • Line 54: warning: exported function FeCopy should have comment or be unexported (golint)
    • Line 58: warning: comment on exported function FeCMove should be of the form "FeCMove ..." (golint)
    • Line 93: warning: exported function FeFromBytes should have comment or be unexported (golint)
    • Line 220: warning: exported function FeIsNegative should have comment or be unexported (golint)
    • Line 226: warning: exported function FeIsNonZero should have comment or be unexported (golint)
    • Line 259: warning: exported function FeCombine should have comment or be unexported (golint)
    • Line 506: warning: exported function FeInvert should have comment or be unexported (golint)
    • Line 631: warning: exported type ProjectiveGroupElement should have comment or be unexported (golint)
    • Line 635: warning: exported type ExtendedGroupElement should have comment or be unexported (golint)
    • Line 639: warning: exported type CompletedGroupElement should have comment or be unexported (golint)
    • Line 643: warning: exported type PreComputedGroupElement should have comment or be unexported (golint)
    • Line 647: warning: exported type CachedGroupElement should have comment or be unexported (golint)
    • Line 651: warning: exported method ProjectiveGroupElement.Zero should have comment or be unexported (golint)
    • Line 657: warning: exported method ProjectiveGroupElement.Double should have comment or be unexported (golint)
    • Line 671: warning: exported method ProjectiveGroupElement.ToBytes should have comment or be unexported (golint)
    • Line 681: warning: exported method ExtendedGroupElement.Zero should have comment or be unexported (golint)
    • Line 688: warning: exported method ExtendedGroupElement.Double should have comment or be unexported (golint)
    • Line 694: warning: exported method ExtendedGroupElement.ToCached should have comment or be unexported (golint)
    • Line 701: warning: exported method ExtendedGroupElement.ToProjective should have comment or be unexported (golint)
    • Line 707: warning: exported method ExtendedGroupElement.ToBytes should have comment or be unexported (golint)
    • Line 717: warning: exported method ExtendedGroupElement.FromBytes should have comment or be unexported (golint)
    • Line 763: warning: exported method CompletedGroupElement.ToProjective should have comment or be unexported (golint)
    • Line 769: warning: exported method CompletedGroupElement.ToExtended should have comment or be unexported (golint)
    • Line 776: warning: exported method PreComputedGroupElement.Zero should have comment or be unexported (golint)
    • Line 942: warning: exported function PreComputedGroupElementCMove should have comment or be unexported (golint)
    • Line 1017: warning: comment on exported function ScMulAdd should be of the form "ScMulAdd ..." (golint)
    • Line 1450: warning: comment on exported function ScReduce should be of the form "ScReduce ..." (golint)
    • chain/core/pin/pin.go
    • Line 18: warning: exported type Store should have comment or be unexported (golint)
    • Line 26: warning: exported function NewStore should have comment or be unexported (golint)
    • Line 35: warning: exported method Store.ProcessBlocks should have comment or be unexported (golint)
    • Line 56: warning: exported method Store.CreatePin should have comment or be unexported (golint)
    • Line 75: warning: exported method Store.Height should have comment or be unexported (golint)
    • Line 80: warning: exported method Store.LoadAll should have comment or be unexported (golint)
    • Line 104: warning: exported method Store.PinWaiter should have comment or be unexported (golint)
    • Line 118: warning: exported method Store.AllWaiter should have comment or be unexported (golint)
    • Line 135: warning: exported method Store.Listen should have comment or be unexported (golint)
    • chain/core/signers/signers.go
    • Line 21: warning: exported const AssetKeySpace should have comment (or a comment on this block) or be unexported (golint)
    • Line 134: warning: exported function New should have comment or be unexported (golint)
    • Line 254: warning: exported function ConvertKeys should have comment or be unexported (golint)
    • chain/exp/ivy/compiler/ast.go
    • Line 250: warning: receiver name e should be consistent with previous receiver name v for varRef (golint)
    • Line 257: warning: receiver name e should be consistent with previous receiver name v for varRef (golint)
    • chain/protocol/prottest/memstore/memstore.go
    • Line 1: warning: package comment should be of the form "Package memstore ..." (golint)
    • Line 29: warning: exported method MemStore.Height should have comment or be unexported (golint)
    • Line 36: warning: exported method MemStore.SaveBlock should have comment or be unexported (golint)
    • Line 48: warning: exported method MemStore.SaveSnapshot should have comment or be unexported (golint)
    • Line 57: warning: exported method MemStore.GetBlock should have comment or be unexported (golint)
    • Line 67: warning: exported method MemStore.LatestSnapshot should have comment or be unexported (golint)
    • Line 77: warning: exported method MemStore.FinalizeBlock should have comment or be unexported (golint)
    • chain/protocol/bc/tx.go
    • Line 20: warning: exported method Tx.SigHash should have comment or be unexported (golint)
    • Line 33: warning: exported var ErrEntryType should have comment or be unexported (golint)
    • Line 37: warning: exported method Tx.TimeRange should have comment or be unexported (golint)
    • Line 49: warning: exported method Tx.Output should have comment or be unexported (golint)
    • Line 61: warning: exported method Tx.Spend should have comment or be unexported (golint)
    • Line 73: warning: exported method Tx.Issuance should have comment or be unexported (golint)
    • Line 85: warning: exported method Tx.Nonce should have comment or be unexported (golint)
    • chain/core/asset/block.go
    • Line 31: warning: exported function Annotated should have comment or be unexported (golint)
    • Line 99: warning: exported method Registry.ProcessBlocks should have comment or be unexported (golint)
    • chain/core/asset/builder.go
    • Line 18: warning: exported method Registry.NewIssueAction should have comment or be unexported (golint)
    • Line 26: warning: exported method Registry.DecodeIssueAction should have comment or be unexported (golint)
    • chain/protocol/vm/vmutil/builder.go
    • Line 10: warning: exported type Builder should have comment or be unexported (golint)
    • Line 22: warning: exported function NewBuilder should have comment or be unexported (golint)
    • Line 69: warning: comment on exported method Builder.AddJumpIf should be of the form "AddJumpIf ..." (golint)
    • Line 95: warning: exported var ErrUnresolvedJump should have comment or be unexported (golint)
    • chain/core/txbuilder/builder.go
    • Line 13: warning: exported function NewBuilder should have comment or be unexported (golint)
    • Line 17: warning: exported type TemplateBuilder should have comment or be unexported (golint)
    • Line 29: warning: exported method TemplateBuilder.AddInput should have comment or be unexported (golint)
    • Line 38: warning: exported method TemplateBuilder.AddOutput should have comment or be unexported (golint)
    • Line 46: warning: exported method TemplateBuilder.RestrictMinTime should have comment or be unexported (golint)
    • Line 52: warning: exported method TemplateBuilder.RestrictMaxTime should have comment or be unexported (golint)
    • Line 58: warning: exported method TemplateBuilder.MaxTime should have comment or be unexported (golint)
    • Line 96: warning: exported method TemplateBuilder.Build should have comment or be unexported (golint)
    • chain/crypto/ed25519/chainkd/serialize.go
    • Line 14: warning: exported var ErrBadKeyLen should have comment or be unexported (golint)
    • Line 18: warning: exported method XPub.MarshalText should have comment or be unexported (golint)
    • Line 24: warning: exported method XPub.Bytes should have comment or be unexported (golint)
    • Line 28: warning: exported method XPrv.MarshalText should have comment or be unexported (golint)
    • Line 34: warning: exported method XPrv.Bytes should have comment or be unexported (golint)
    • Line 38: warning: exported method XPub.UnmarshalText should have comment or be unexported (golint)
    • Line 50: warning: exported method XPrv.UnmarshalText should have comment or be unexported (golint)
    • chain/exp/ivy/compiler/ivytest/ivytest.go
    • Line 3: warning: exported const TrivialLock should have comment or be unexported (golint)
    • Line 11: warning: exported const LockWithPublicKey should have comment or be unexported (golint)
    • Line 20: warning: exported const LockWithPKHash should have comment or be unexported (golint)
    • Line 30: warning: exported const LockWith2of3Keys should have comment or be unexported (golint)
    • Line 39: warning: exported const LockToOutput should have comment or be unexported (golint)
    • Line 47: warning: exported const TradeOffer should have comment or be unexported (golint)
    • Line 60: warning: exported const EscrowedTransfer should have comment or be unexported (golint)
    • Line 73: warning: exported const CollateralizedLoan should have comment or be unexported (golint)
    • Line 86: warning: exported const RevealPreimage should have comment or be unexported (golint)
    • Line 95: warning: exported const PriceChanger should have comment or be unexported (golint)
    • Line 108: warning: exported const CallOptionWithSettlement should have comment or be unexported (golint)
    • Line 134: warning: exported const OneTwo should have comment or be unexported (golint)
    • chain/protocol/bc/legacy/issuance.go
    • Line 8: warning: exported type IssuanceInput should have comment or be unexported (golint)
    • Line 22: warning: exported method IssuanceInput.IsIssuance should have comment or be unexported (golint)
    • Line 24: warning: exported method IssuanceInput.AssetID should have comment or be unexported (golint)
    • Line 29: warning: exported method IssuanceInput.AssetDefinitionHash should have comment or be unexported (golint)
    • Line 37: warning: exported function NewIssuanceInput should have comment or be unexported (golint)
    • chain/protocol/bc/legacy/transaction.go
    • Line 25: warning: exported method Tx.UnmarshalText should have comment or be unexported (golint)
    • Line 47: warning: exported method Tx.IssuanceHash should have comment or be unexported (golint)
    • Line 51: warning: exported method Tx.OutputID should have comment or be unexported (golint)
    • Line 110: warning: exported method TxData.UnmarshalText should have comment or be unexported (golint)
    • Line 197: warning: exported method TxData.MarshalText should have comment or be unexported (golint)
    • chain/crypto/ed25519/chainkd/util.go
    • Line 11: warning: exported function NewXKeys should have comment or be unexported (golint)
    • Line 19: warning: exported function XPubKeys should have comment or be unexported (golint)
    • Line 27: warning: exported function DeriveXPubs should have comment or be unexported (golint)
    • chain/net/http/limit/limit.go
    • Line 10: warning: exported type BucketLimiter should have comment or be unexported (golint)
    • Line 18: warning: exported function NewBucketLimiter should have comment or be unexported (golint)
    • Line 26: warning: exported method BucketLimiter.Allow should have comment or be unexported (golint)
    • Line 49: warning: exported function Handler should have comment or be unexported (golint)
    • Line 67: warning: exported function RemoteAddrID should have comment or be unexported (golint)
    • Line 71: warning: exported function AuthUserID should have comment or be unexported (golint)
    • chain/protocol/bc/legacy/block.go
    • Line 16: warning: exported const SerBlockWitness should have comment (or a comment on this block) or be unexported (golint)
    • Line 120: warning: exported method Block.WriteTo should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.

    • chain/crypto/ed25519/internal/edwards25519/edwards25519.go
    • Line 1166: warning: ineffectual assignment to s23 (ineffassign)
    • Line 1174: warning: ineffectual assignment to s22 (ineffassign)
    • Line 1182: warning: ineffectual assignment to s21 (ineffassign)
    • Line 1190: warning: ineffectual assignment to s20 (ineffassign)
    • Line 1198: warning: ineffectual assignment to s19 (ineffassign)
    • Line 1206: warning: ineffectual assignment to s18 (ineffassign)
    • Line 1249: warning: ineffectual assignment to s17 (ineffassign)
    • Line 1257: warning: ineffectual assignment to s16 (ineffassign)
    • Line 1265: warning: ineffectual assignment to s15 (ineffassign)
    • Line 1273: warning: ineffectual assignment to s14 (ineffassign)
    • Line 1281: warning: ineffectual assignment to s13 (ineffassign)
    • Line 1380: warning: ineffectual assignment to s12 (ineffassign)
    • Line 1488: warning: ineffectual assignment to s23 (ineffassign)
    • Line 1496: warning: ineffectual assignment to s22 (ineffassign)
    • Line 1504: warning: ineffectual assignment to s21 (ineffassign)
    • Line 1512: warning: ineffectual assignment to s20 (ineffassign)
    • Line 1520: warning: ineffectual assignment to s19 (ineffassign)
    • Line 1528: warning: ineffectual assignment to s18 (ineffassign)
    • Line 1573: warning: ineffectual assignment to s17 (ineffassign)
    • Line 1581: warning: ineffectual assignment to s16 (ineffassign)
    • Line 1589: warning: ineffectual assignment to s15 (ineffassign)
    • Line 1597: warning: ineffectual assignment to s14 (ineffassign)
    • Line 1605: warning: ineffectual assignment to s13 (ineffassign)
    • Line 1704: warning: ineffectual assignment to s12 (ineffassign)

misspell99%

Misspell Finds commonly misspelled English words