Preparing report...

Report for github.com/beyond-blockchain/bbclib-go

D    Needs lots of improvement    Found 27 issues across 30 files

Tweet

gofmt10%

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!


gocyclo86%

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.

    • bbclib-go/bbclib_test.go
    • Line 556: warning: cyclomatic complexity 86 of function TestBBcLibTester() is high (> 15) (gocyclo)
    • Line 434: warning: cyclomatic complexity 23 of function TestBBcLibSerializeDeserializeWithLengthConf() is high (> 15) (gocyclo)
    • bbclib-go/transaction_test.go
    • Line 378: warning: cyclomatic complexity 23 of function TestTransactionWithVariousIdLength() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 21 of function TestTransactionPackUnpackSimpleWithEvent() is high (> 15) (gocyclo)

golint43%

Golint is a linter for Go source code.

    • bbclib-go/witness.go
    • Line 62: warning: comment on exported method BBcWitness.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • bbclib-go/asset_raw.go
    • Line 52: warning: comment on exported method BBcAssetRaw.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • bbclib-go/bbclib.go
    • Line 51: warning: exported type BBcIdConfig should have comment or be unexported (golint)
    • Line 64: warning: exported var IdLengthConfig should have comment or be unexported (golint)
    • Line 73: warning: comment on exported function ConfigureIdLength should be of the form "ConfigureIdLength ..." (golint)
    • Line 92: warning: comment on exported function ConfigureIdLengthAll should be of the form "ConfigureIdLengthAll ..." (golint)
    • Line 103: warning: comment on exported function UpdateIdLengthConfig should be of the form "UpdateIdLengthConfig ..." (golint)
    • bbclib-go/bbclib_test.go
    • Line 441: warning: don't use underscores in Go names; var txobj_deserialized should be txobjDeserialized (golint)
    • Line 456: warning: don't use underscores in Go names; var txobj_deserialized should be txobjDeserialized (golint)
    • Line 474: warning: don't use underscores in Go names; var txobj_deserialized should be txobjDeserialized (golint)
    • Line 489: warning: don't use underscores in Go names; var txobj_deserialized should be txobjDeserialized (golint)
    • Line 504: warning: don't use underscores in Go names; var txobj_deserialized should be txobjDeserialized (golint)
    • Line 518: warning: don't use underscores in Go names; var txobj_deserialized should be txobjDeserialized (golint)
    • bbclib-go/crossref.go
    • Line 56: warning: comment on exported method BBcCrossRef.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • bbclib-go/transaction_test.go
    • Line 35: warning: don't use underscores in Go names; var txtest_u1 should be txtestU1 (golint)
    • Line 36: warning: don't use underscores in Go names; var txtest_u2 should be txtestU2 (golint)
    • Line 37: warning: don't use underscores in Go names; var txtest_u3 should be txtestU3 (golint)
    • Line 38: warning: don't use underscores in Go names; var txtest_u4 should be txtestU4 (golint)
    • Line 39: warning: don't use underscores in Go names; var txtest_u5 should be txtestU5 (golint)
    • Line 40: warning: don't use underscores in Go names; var txtest_u6 should be txtestU6 (golint)
    • bbclib-go/relation.go
    • Line 80: warning: comment on exported method BBcRelation.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • Line 85: warning: comment on exported method BBcRelation.SetVersion should be of the form "SetVersion ..." (golint)
    • Line 97: warning: comment on exported method BBcRelation.CreateAsset should be of the form "CreateAsset ..." (golint)
    • Line 112: warning: comment on exported method BBcRelation.CreateAssetRaw should be of the form "CreateAssetRaw ..." (golint)
    • Line 123: warning: comment on exported method BBcRelation.CreateAssetHash should be of the form "CreateAssetHash ..." (golint)
    • Line 134: warning: comment on exported method BBcRelation.CreatePointer should be of the form "CreatePointer ..." (golint)
    • bbclib-go/signature.go
    • Line 88: warning: comment on exported method BBcSignature.VerifyWithPublicKey should be of the form "VerifyWithPublicKey ..." (golint)
    • bbclib-go/asset.go
    • Line 97: warning: comment on exported method BBcAsset.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • bbclib-go/asset_hash.go
    • Line 56: warning: comment on exported method BBcAssetHash.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • bbclib-go/event.go
    • Line 92: warning: comment on exported method BBcEvent.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • Line 124: warning: comment on exported method BBcEvent.SetOptionParams should be of the form "SetOptionParams ..." (golint)
    • Line 147: warning: comment on exported method BBcEvent.CreateAsset should be of the form "CreateAsset ..." (golint)
    • bbclib-go/keypair.go
    • Line 183: warning: comment on exported method KeyPair.ConvertFromDer should be of the form "ConvertFromDer ..." (golint)
    • Line 221: warning: comment on exported method KeyPair.CheckX509 should be of the form "CheckX509 ..." (golint)
    • Line 262: warning: comment on exported method KeyPair.OutputPem should be of the form "OutputPem ..." (golint)
    • Line 277: warning: comment on exported method KeyPair.OutputPublicKeyDer should be of the form "OutputPublicKeyDer ..." (golint)
    • Line 286: warning: comment on exported method KeyPair.OutputPublicKeyPem should be of the form "OutputPublicKeyPem ..." (golint)
    • bbclib-go/reference.go
    • Line 63: warning: comment on exported method BBcReference.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • bbclib-go/pointer.go
    • Line 47: warning: comment on exported method BBcPointer.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • bbclib-go/transaction.go
    • Line 122: warning: comment on exported method BBcTransaction.SetIdLengthConf should be of the form "SetIdLengthConf ..." (golint)
    • Line 160: warning: comment on exported method BBcTransaction.CreateReference should be of the form "CreateReference ..." (golint)
    • Line 170: warning: comment on exported method BBcTransaction.CreateCrossRef should be of the form "CreateCrossRef ..." (golint)
    • Line 192: warning: comment on exported method BBcTransaction.Sign should be of the form "Sign ..." (golint)
    • Line 224: warning: comment on exported method BBcTransaction.AddSignatureObj should be of the form "AddSignatureObj ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!