Preparing report...

Report for github.com/blk-io/crux

A+    Excellent!    Found 18 issues across 27 files

Tweet

gofmt96%

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.

    • crux/crux.go
    • Line 17: warning: cyclomatic complexity 24 of function main() is high (> 15) (gocyclo)

golint44%

Golint is a linter for Go source code.

    • crux/api/internal.go
    • Line 47: warning: exported method PartyInfo.GetAllValues should have comment or be unexported (golint)
    • Line 96: warning: exported method PartyInfo.GetPartyInfoGrpc should have comment or be unexported (golint)
    • Line 240: warning: exported method PartyInfo.PollPartyInfo should have comment or be unexported (golint)
    • Line 288: warning: exported method PartyInfo.UpdatePartyInfoGrpc should have comment or be unexported (golint)
    • Line 305: warning: exported function PushGrpc should have comment or be unexported (golint)
    • crux/storage/leveldb.go
    • Line 12: warning: exported function InitLevelDb should have comment or be unexported (golint)
    • Line 28: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • crux/server/server.go
    • Line 138: warning: exported function CheckCertFiles should have comment or be unexported (golint)
    • Line 147: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 151: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 155: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 186: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 220: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 244: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 252: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 276: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 296: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 311: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 316: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 335: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 352: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 391: warning: receiver name s should be consistent with previous receiver name tm for TransactionManager (golint)
    • Line 397: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • crux/server/server_handler.go
    • Line 15: warning: exported type Server should have comment or be unexported (golint)
    • Line 19: warning: exported method Server.Version should have comment or be unexported (golint)
    • Line 23: warning: exported method Server.Upcheck should have comment or be unexported (golint)
    • Line 26: warning: exported method Server.Send should have comment or be unexported (golint)
    • Line 56: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 64: warning: exported method Server.Receive should have comment or be unexported (golint)
    • Line 83: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 88: warning: exported method Server.UpdatePartyInfo should have comment or be unexported (golint)
    • Line 105: warning: exported method Server.Push should have comment or be unexported (golint)
    • Line 129: warning: exported method Server.Delete should have comment or be unexported (golint)
    • Line 138: warning: exported method Server.Resend should have comment or be unexported (golint)
    • crux/utils/key.go
    • Line 9: warning: exported function ToKey should have comment or be unexported (golint)
    • Line 18: warning: exported function LoadBase64Key should have comment or be unexported (golint)
    • crux/api/encoding.go
    • Line 9: warning: exported function EncodePayload should have comment or be unexported (golint)
    • Line 23: warning: exported function DecodePayload should have comment or be unexported (golint)
    • Line 41: warning: exported function EncodePayloadWithRecipients should have comment or be unexported (golint)
    • Line 54: warning: exported function DecodePayloadWithRecipients should have comment or be unexported (golint)
    • Line 64: warning: exported function EncodePartyInfo should have comment or be unexported (golint)
    • Line 92: warning: exported function DecodePartyInfo should have comment or be unexported (golint)
    • Line 139: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • crux/storage/berkleydb.go
    • Line 13: warning: exported function InitBerkeleyDb should have comment or be unexported (golint)
    • Line 35: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • crux/utils/file.go
    • Line 9: warning: exported function CreateIpcSocket should have comment or be unexported (golint)
    • Line 26: warning: exported function CreateDirForFile should have comment or be unexported (golint)
    • crux/enclave/enclave.go
    • Line 264: warning: comment on exported method SecureEnclave.StorePayload should be of the form "StorePayload ..." (golint)
    • Line 273: warning: exported method SecureEnclave.StorePayloadGrpc should have comment or be unexported (golint)
    • Line 419: warning: exported method SecureEnclave.UpdatePartyInfoGrpc should have comment or be unexported (golint)
    • Line 428: warning: exported method SecureEnclave.GetEncodedPartyInfoGrpc should have comment or be unexported (golint)
    • Line 436: warning: exported method SecureEnclave.GetPartyInfo should have comment or be unexported (golint)
    • crux/api/client.go
    • Line 20: warning: comment on exported type ReceiveRequest should be of the form "ReceiveRequest ..." (with optional leading article) (golint)
    • Line 48: warning: exported type UpdatePartyInfo should have comment or be unexported (golint)
    • Line 54: warning: exported type PartyInfoResponse should have comment or be unexported (golint)
    • Line 57: warning: exported type PrivateKeyBytes should have comment or be unexported (golint)
    • crux/config/config.go
    • Line 13: warning: exported const Verbosity should have comment (or a comment on this block) or be unexported (golint)
    • Line 95: warning: exported function AllSettings should have comment or be unexported (golint)
    • Line 99: warning: exported function GetBool should have comment or be unexported (golint)
    • Line 103: warning: exported function GetInt should have comment or be unexported (golint)
    • Line 107: warning: exported function GetString should have comment or be unexported (golint)
    • Line 111: warning: exported function GetStringSlice should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign77%

IneffAssign detects ineffectual assignments in Go code.

    • crux/api/encoding.go
    • Line 36: warning: ineffectual assignment to offset (ineffassign)
    • Line 87: warning: ineffectual assignment to offset (ineffassign)
    • Line 115: warning: ineffectual assignment to offset (ineffassign)
    • crux/enclave/enclave_test.go
    • Line 110: warning: ineffectual assignment to err (ineffassign)
    • Line 152: warning: ineffectual assignment to err (ineffassign)
    • Line 161: warning: ineffectual assignment to err (ineffassign)
    • Line 188: warning: ineffectual assignment to err (ineffassign)
    • Line 269: warning: ineffectual assignment to err (ineffassign)
    • Line 296: warning: ineffectual assignment to err (ineffassign)
    • Line 339: warning: ineffectual assignment to err (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!