Preparing report...

Report for git.parallelcoin.io/dev/rpcx

(v0.0.0-20190829033934-d995e874b384)

A    Great!    Found 47 issues across 80 files

Tweet

gofmt70%

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!


gocyclo85%

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.

    • /git.parallelcoin.io/dev/rpcx/client/xclient.go
    • Line 370: warning: cyclomatic complexity 39 of function (*xClient).Call() is high (> 15) (gocyclo)
    • Line 507: warning: cyclomatic complexity 22 of function (*xClient).SendRaw() is high (> 15) (gocyclo)
    • Line 680: warning: cyclomatic complexity 19 of function (*xClient).Fork() is high (> 15) (gocyclo)
    • Line 764: warning: cyclomatic complexity 16 of function (*xClient).SendFile() is high (> 15) (gocyclo)

golint63%

Golint is a linter for Go source code.

    • /git.parallelcoin.io/dev/rpcx/client/opencensus.go
    • Line 10: warning: exported type OpenCensusPlugin should have comment or be unexported (golint)
    • Line 12: warning: exported method OpenCensusPlugin.DoPreCall should have comment or be unexported (golint)
    • Line 36: warning: exported method OpenCensusPlugin.DoPostCall should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/serverplugin/opencensus.go
    • Line 13: warning: exported type OpenCensusPlugin should have comment or be unexported (golint)
    • Line 15: warning: exported method OpenCensusPlugin.Register should have comment or be unexported (golint)
    • Line 24: warning: exported method OpenCensusPlugin.RegisterFunction should have comment or be unexported (golint)
    • Line 32: warning: exported method OpenCensusPlugin.PostConnAccept should have comment or be unexported (golint)
    • Line 40: warning: exported method OpenCensusPlugin.PreHandleRequest should have comment or be unexported (golint)
    • Line 56: warning: exported method OpenCensusPlugin.PostWriteResponse should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/serverplugin/opentracing.go
    • Line 15: warning: exported type OpenTracingPlugin should have comment or be unexported (golint)
    • Line 17: warning: exported method OpenTracingPlugin.Register should have comment or be unexported (golint)
    • Line 27: warning: exported method OpenTracingPlugin.RegisterFunction should have comment or be unexported (golint)
    • Line 36: warning: exported method OpenTracingPlugin.PostConnAccept should have comment or be unexported (golint)
    • Line 45: warning: exported method OpenTracingPlugin.PreHandleRequest should have comment or be unexported (golint)
    • Line 63: warning: exported method OpenTracingPlugin.PostWriteResponse should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/serverplugin/file_transfer.go
    • Line 17: warning: exported var SendFileServiceName should have comment or be unexported (golint)
    • Line 69: warning: exported type FileTransferService should have comment or be unexported (golint)
    • Line 98: warning: exported method FileTransferService.TransferFile should have comment or be unexported (golint)
    • Line 114: warning: exported method FileTransferService.DownloadFile should have comment or be unexported (golint)
    • Line 130: warning: exported method FileTransfer.Start should have comment or be unexported (golint)
    • Line 217: warning: exported method FileTransfer.Stop should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/util/converter.go
    • Line 7: warning: exported function SliceByteToString should have comment or be unexported (golint)
    • Line 11: warning: exported function StringToSliceByte should have comment or be unexported (golint)
    • Line 17: warning: exported function CopyMeta should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/client/opentracing.go
    • Line 11: warning: exported type OpenTracingPlugin should have comment or be unexported (golint)
    • Line 13: warning: exported method OpenTracingPlugin.DoPreCall should have comment or be unexported (golint)
    • Line 39: warning: exported method OpenTracingPlugin.DoPostCall should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/server/jsonrpc2_wire.go
    • Line 91: warning: exported method JSONRPCError.JSONRPCError should have comment or be unexported (golint)
    • Line 98: warning: exported method VersionTag.MarshalJSON should have comment or be unexported (golint)
    • Line 102: warning: exported method VersionTag.UnmarshalJSON should have comment or be unexported (golint)
    • Line 126: warning: exported method ID.MarshalJSON should have comment or be unexported (golint)
    • Line 133: warning: exported method ID.UnmarshalJSON should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/log/logger.go
    • Line 14: warning: exported type Logger should have comment or be unexported (golint)
    • Line 34: warning: exported type Handler should have comment or be unexported (golint)
    • Line 38: warning: exported function SetLogger should have comment or be unexported (golint)
    • Line 42: warning: exported function SetDummyLogger should have comment or be unexported (golint)
    • Line 46: warning: exported function Debug should have comment or be unexported (golint)
    • Line 49: warning: exported function Debugf should have comment or be unexported (golint)
    • Line 53: warning: exported function Info should have comment or be unexported (golint)
    • Line 56: warning: exported function Infof should have comment or be unexported (golint)
    • Line 60: warning: exported function Warn should have comment or be unexported (golint)
    • Line 63: warning: exported function Warnf should have comment or be unexported (golint)
    • Line 67: warning: exported function Error should have comment or be unexported (golint)
    • Line 70: warning: exported function Errorf should have comment or be unexported (golint)
    • Line 74: warning: exported function Fatal should have comment or be unexported (golint)
    • Line 77: warning: exported function Fatalf should have comment or be unexported (golint)
    • Line 81: warning: exported function Panic should have comment or be unexported (golint)
    • Line 84: warning: exported function Panicf should have comment or be unexported (golint)
    • Line 88: warning: exported function Handle should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/share/context.go
    • Line 21: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 25: warning: exported method Context.Value should have comment or be unexported (golint)
    • Line 32: warning: exported method Context.SetValue should have comment or be unexported (golint)
    • Line 40: warning: exported function WithValue should have comment or be unexported (golint)
    • Line 53: warning: exported function WithLocalValue should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/serverplugin/trace.go
    • Line 13: warning: exported type TracePlugin should have comment or be unexported (golint)
    • Line 16: warning: exported method TracePlugin.Register should have comment or be unexported (golint)
    • Line 23: warning: exported method TracePlugin.RegisterFunction should have comment or be unexported (golint)
    • Line 30: warning: exported function GetFunctionName should have comment or be unexported (golint)
    • Line 34: warning: exported method TracePlugin.PostConnAccept should have comment or be unexported (golint)
    • Line 41: warning: exported method TracePlugin.PostReadRequest should have comment or be unexported (golint)
    • Line 48: warning: exported method TracePlugin.PostWriteResponse should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/client/circuit_breaker.go
    • Line 10: warning: exported var ErrBreakerOpen should have comment or be unexported (golint)
    • Line 84: warning: exported method ConsecCircuitBreaker.Success should have comment or be unexported (golint)
    • Line 87: warning: exported method ConsecCircuitBreaker.Fail should have comment or be unexported (golint)
    • Line 91: warning: exported method ConsecCircuitBreaker.Ready should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/protocol/compressor.go
    • Line 17: warning: exported method GzipCompressor.Zip should have comment or be unexported (golint)
    • Line 21: warning: exported method GzipCompressor.Unzip should have comment or be unexported (golint)
    • Line 25: warning: exported type RawDataCompressor should have comment or be unexported (golint)
    • Line 28: warning: exported method RawDataCompressor.Zip should have comment or be unexported (golint)
    • Line 32: warning: exported method RawDataCompressor.Unzip should have comment or be unexported (golint)
    • /git.parallelcoin.io/dev/rpcx/client/xclient.go
    • Line 24: warning: exported const FileTransferBufferSize should have comment (or a comment on this block) or be unexported (golint)
    • Line 817: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 828: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words