Preparing report...

Report for github.com/the729/go-libra

A    Great!    Found 37 issues across 80 files

Tweet

gofmt76%

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!


gocyclo96%

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.

    • go-libra/example/cli_client/wallet.go
    • Line 16: warning: exported type Account should have comment or be unexported (golint)
    • Line 23: warning: exported type AccountConfig should have comment or be unexported (golint)
    • Line 29: warning: exported type WalletConfig should have comment or be unexported (golint)
    • Line 33: warning: exported type SimpleWallet should have comment or be unexported (golint)
    • Line 37: warning: exported function LoadAccounts should have comment or be unexported (golint)
    • Line 70: warning: exported method SimpleWallet.GetAccount should have comment or be unexported (golint)
    • go-libra/crypto/types.go
    • Line 9: warning: exported type PublicKey should have comment or be unexported (golint)
    • Line 10: warning: exported type PrivateKey should have comment or be unexported (golint)
    • Line 12: warning: exported method PublicKey.UnmarshalText should have comment or be unexported (golint)
    • Line 24: warning: exported method PublicKey.MarshalText should have comment or be unexported (golint)
    • Line 28: warning: exported method PrivateKey.UnmarshalText should have comment or be unexported (golint)
    • Line 40: warning: exported method PrivateKey.MarshalText should have comment or be unexported (golint)
    • go-libra/types/validator_verifier.go
    • Line 10: warning: error var VerifyErrUnknownAuthor should have name of the form ErrFoo (golint)
    • Line 10: warning: exported var VerifyErrUnknownAuthor should have comment or be unexported (golint)
    • Line 11: warning: error var VerifyErrInvalidSignature should have name of the form ErrFoo (golint)
    • Line 12: warning: error var VerifyErrTooFewSignatures should have name of the form ErrFoo (golint)
    • Line 13: warning: error var VerifyErrTooManySignatures should have name of the form ErrFoo (golint)
    • go-libra/crypto/sha3libra/hashes.go
    • Line 12: warning: exported const HashSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 15: warning: exported type HashValue should have comment or be unexported (golint)
    • Line 41: warning: exported function NewStructTag should have comment or be unexported (golint)
    • Line 44: warning: exported function NewAccountAddress should have comment or be unexported (golint)
    • Line 47: warning: exported function NewLedgerInfo should have comment or be unexported (golint)
    • Line 48: warning: exported function NewWaypointLedgerInfo should have comment or be unexported (golint)
    • Line 51: warning: exported function NewTransactionAccumulator should have comment or be unexported (golint)
    • Line 52: warning: exported function NewEventAccumulator should have comment or be unexported (golint)
    • Line 53: warning: exported function NewSparseMerkleInternal should have comment or be unexported (golint)
    • Line 54: warning: exported function NewSparseMerkleLeaf should have comment or be unexported (golint)
    • Line 57: warning: exported function NewAccountStateBlob should have comment or be unexported (golint)
    • Line 60: warning: exported function NewTransactionInfo should have comment or be unexported (golint)
    • Line 63: warning: exported function NewTransaction should have comment or be unexported (golint)
    • Line 64: warning: exported function NewRawTransaction should have comment or be unexported (golint)
    • Line 67: warning: exported function NewSignedTransaction should have comment or be unexported (golint)
    • Line 70: warning: exported function NewBlock should have comment or be unexported (golint)
    • Line 71: warning: exported function NewPacemakerTimeout should have comment or be unexported (golint)
    • Line 72: warning: exported function NewTimeoutMsg should have comment or be unexported (golint)
    • Line 73: warning: exported function NewVoteMsg should have comment or be unexported (golint)
    • Line 74: warning: exported function NewContractEvent should have comment or be unexported (golint)
    • Line 77: warning: exported function NewDiscoveryMsg should have comment or be unexported (golint)
    • go-libra/types/contract_event.go
    • Line 14: warning: exported type EventKey should have comment or be unexported (golint)
    • Line 16: warning: exported type EventHandle should have comment or be unexported (golint)
    • Line 21: warning: exported type ContractEvent should have comment or be unexported (golint)
    • go-libra/types/language_storage.go
    • Line 9: warning: exported const CodeTag should have comment (or a comment on this block) or be unexported (golint)
    • Line 19: warning: exported type TypeTag should have comment or be unexported (golint)
    • Line 44: warning: exported method TypeTagBool.Clone should have comment or be unexported (golint)
    • Line 45: warning: exported method TypeTagU8.Clone should have comment or be unexported (golint)
    • Line 46: warning: exported method TypeTagU64.Clone should have comment or be unexported (golint)
    • Line 47: warning: exported method TypeTagU128.Clone should have comment or be unexported (golint)
    • Line 48: warning: exported method TypeTagAddress.Clone should have comment or be unexported (golint)
    • Line 49: warning: exported method TypeTagTypeTags.Clone should have comment or be unexported (golint)
    • Line 95: warning: exported type TypeTagWrap should have comment or be unexported (golint)
    • Line 124: warning: exported method StructTag.Clone should have comment or be unexported (golint)
    • go-libra/types/vm_error.go
    • Line 3: warning: exported type VMStatusCode should have comment or be unexported (golint)
    • Line 6: warning: comment on exported const UNKNOWN_VALIDATION_STATUS should be of the form "UNKNOWN_VALIDATION_STATUS ..." (golint)
    • Line 10: warning: comment on exported const INVALID_SIGNATURE should be of the form "INVALID_SIGNATURE ..." (golint)
    • Line 12: warning: comment on exported const INVALID_AUTH_KEY should be of the form "INVALID_AUTH_KEY ..." (golint)
    • Line 14: warning: comment on exported const SEQUENCE_NUMBER_TOO_OLD should be of the form "SEQUENCE_NUMBER_TOO_OLD ..." (golint)
    • Line 16: warning: comment on exported const SEQUENCE_NUMBER_TOO_NEW should be of the form "SEQUENCE_NUMBER_TOO_NEW ..." (golint)
    • Line 18: warning: comment on exported const INSUFFICIENT_BALANCE_FOR_TRANSACTION_FEE should be of the form "INSUFFICIENT_BALANCE_FOR_TRANSACTION_FEE ..." (golint)
    • Line 20: warning: comment on exported const TRANSACTION_EXPIRED should be of the form "TRANSACTION_EXPIRED ..." (golint)
    • Line 22: warning: comment on exported const SENDING_ACCOUNT_DOES_NOT_EXIST should be of the form "SENDING_ACCOUNT_DOES_NOT_EXIST ..." (golint)
    • Line 24: warning: comment on exported const REJECTED_WRITE_SET should be of the form "REJECTED_WRITE_SET ..." (golint)
    • Line 27: warning: comment on exported const INVALID_WRITE_SET should be of the form "INVALID_WRITE_SET ..." (golint)
    • Line 29: warning: comment on exported const EXCEEDED_MAX_TRANSACTION_SIZE should be of the form "EXCEEDED_MAX_TRANSACTION_SIZE ..." (golint)
    • Line 31: warning: comment on exported const UNKNOWN_SCRIPT should be of the form "UNKNOWN_SCRIPT ..." (golint)
    • Line 33: warning: comment on exported const UNKNOWN_MODULE should be of the form "UNKNOWN_MODULE ..." (golint)
    • Line 35: warning: comment on exported const MAX_GAS_UNITS_EXCEEDS_MAX_GAS_UNITS_BOUND should be of the form "MAX_GAS_UNITS_EXCEEDS_MAX_GAS_UNITS_BOUND ..." (golint)
    • Line 38: warning: comment on exported const MAX_GAS_UNITS_BELOW_MIN_TRANSACTION_GAS_UNITS should be of the form "MAX_GAS_UNITS_BELOW_MIN_TRANSACTION_GAS_UNITS ..." (golint)
    • Line 41: warning: comment on exported const GAS_UNIT_PRICE_BELOW_MIN_BOUND should be of the form "GAS_UNIT_PRICE_BELOW_MIN_BOUND ..." (golint)
    • Line 44: warning: comment on exported const GAS_UNIT_PRICE_ABOVE_MAX_BOUND should be of the form "GAS_UNIT_PRICE_ABOVE_MAX_BOUND ..." (golint)
    • Line 48: warning: comment on exported const UNKNOWN_VERIFICATION_ERROR should be of the form "UNKNOWN_VERIFICATION_ERROR ..." (golint)
    • Line 52: warning: exported const INDEX_OUT_OF_BOUNDS should have comment (or a comment on this block) or be unexported (golint)
    • Line 117: warning: comment on exported const MODULE_ADDRESS_DOES_NOT_MATCH_SENDER should be of the form "MODULE_ADDRESS_DOES_NOT_MATCH_SENDER ..." (golint)
    • Line 119: warning: comment on exported const NO_MODULE_HANDLES should be of the form "NO_MODULE_HANDLES ..." (golint)
    • Line 131: warning: comment on exported const UNKNOWN_INVARIANT_VIOLATION_ERROR should be of the form "UNKNOWN_INVARIANT_VIOLATION_ERROR ..." (golint)
    • Line 146: warning: comment on exported const UNKNOWN_BINARY_ERROR should be of the form "UNKNOWN_BINARY_ERROR ..." (golint)
    • Line 161: warning: comment on exported const UNKNOWN_RUNTIME_STATUS should be of the form "UNKNOWN_RUNTIME_STATUS ..." (golint)
    • Line 166: warning: comment on exported const RESOURCE_DOES_NOT_EXIST should be of the form "RESOURCE_DOES_NOT_EXIST ..." (golint)
    • Line 168: warning: comment on exported const RESOURCE_ALREADY_EXISTS should be of the form "RESOURCE_ALREADY_EXISTS ..." (golint)
    • Line 171: warning: comment on exported const EVICTED_ACCOUNT_ACCESS should be of the form "EVICTED_ACCOUNT_ACCESS ..." (golint)
    • Line 173: warning: comment on exported const ACCOUNT_ADDRESS_ALREADY_EXISTS should be of the form "ACCOUNT_ADDRESS_ALREADY_EXISTS ..." (golint)
    • Line 183: warning: comment on exported const DUPLICATE_MODULE_NAME should be of the form "DUPLICATE_MODULE_NAME ..." (golint)
    • Line 193: warning: comment on exported const UNKNOWN_STATUS should be of the form "UNKNOWN_STATUS ..." (golint)
    • go-libra/types/validator_info.go
    • Line 14: warning: exported type SchemeED25519 should have comment or be unexported (golint)
    • Line 16: warning: exported method SchemeED25519.Clone should have comment or be unexported (golint)
    • Line 26: warning: exported type ValidatorSet 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.


misspell95%

Misspell Finds commonly misspelled English words