Preparing report...

Report for github.com/blockfreight/go-bftx

A    Great!    Found 24 issues across 31 files

Tweet

gofmt93%

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!


gocyclo100%

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.

No problems detected. Good job!


golint32%

Golint is a linter for Go source code.

    • go-bftx/lib/app/bf_tx/bf_tx.go
    • Line 47: warning: don't use an underscore in package name (golint)
    • Line 132: warning: exported function ByteArrayToBFTX should have comment or be unexported (golint)
    • Line 138: warning: exported method BF_TX.GenerateBFTX should have comment or be unexported (golint)
    • Line 181: warning: exported method BF_TX.SignBFTX should have comment or be unexported (golint)
    • Line 261: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • Line 277: warning: exported method BF_TX.BroadcastBFTX should have comment or be unexported (golint)
    • Line 343: warning: exported method BF_TX.GetBFTX should have comment or be unexported (golint)
    • Line 364: warning: exported method BF_TX.QueryBFTX should have comment or be unexported (golint)
    • Line 404: warning: exported method BF_TX.GetTotal should have comment or be unexported (golint)
    • Line 493: warning: exported type Properties should have comment or be unexported (golint)
    • Line 502: warning: exported type Extension should have comment or be unexported (golint)
    • Line 506: warning: exported type Consol should have comment or be unexported (golint)
    • Line 525: warning: exported type Shipment should have comment or be unexported (golint)
    • go-bftx/api/handlers/transactionHandler.go
    • Line 22: warning: exported function ConstructBfTx should have comment or be unexported (golint)
    • Line 32: warning: exported function SignBfTx should have comment or be unexported (golint)
    • Line 41: warning: exported function EncryptBFTX should have comment or be unexported (golint)
    • Line 94: warning: exported function DecryptBFTX should have comment or be unexported (golint)
    • Line 161: warning: exported function GetTotal should have comment or be unexported (golint)
    • Line 172: warning: exported function GetTransaction should have comment or be unexported (golint)
    • Line 181: warning: exported function QueryTransaction should have comment or be unexported (golint)
    • go-bftx/lib/app/bftx_logger/bftx_logger.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 9: warning: comment on exported function SimpleLogger should be of the form "SimpleLogger ..." (golint)
    • Line 24: warning: comment on exported function StringLoggerString should be of the form "StringLoggerString ..." (golint)
    • Line 39: warning: comment on exported function StringLogger should be of the form "StringLogger ..." (golint)
    • Line 54: warning: comment on exported function TransLogger should be of the form "TransLogger ..." (golint)
    • Line 69: warning: comment on exported function ApiListener should be of the form "ApiListener ..." (golint)
    • go-bftx/lib/app/bft/bft.go
    • Line 156: warning: exported type State should have comment or be unexported (golint)
    • Line 187: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-bftx/config/config.go
    • Line 59: warning: exported var GOPATH should have comment or be unexported (golint)
    • Line 62: warning: exported var GenesisJSONURL should have comment or be unexported (golint)
    • Line 63: warning: exported var ConfigDir should have comment or be unexported (golint)
    • Line 64: warning: exported var Logger should have comment or be unexported (golint)
    • Line 72: warning: exported function GetBlockfreightConfig should have comment or be unexported (golint)
    • Line 104: warning: exported type Config should have comment or be unexported (golint)
    • Line 105: warning: don't use underscores in Go names; struct field GenesisJSON_URL should be GenesisJSONURL (golint)
    • Line 106: warning: don't use underscores in Go names; struct field RPC_ListenAddress should be RPCListenAddress (golint)
    • Line 107: warning: don't use underscores in Go names; struct field P2P_ListenAddress should be P2PListenAddress (golint)
    • Line 108: warning: don't use underscores in Go names; struct field Validator_Domain should be ValidatorDomain (golint)
    • Line 124: warning: exported type Validator should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign90%

IneffAssign detects ineffectual assignments in Go code.


misspell96%

Misspell Finds commonly misspelled English words