Preparing report...

Report for github.com/hslam/rpc

A+    Excellent!    Found 21 issues across 132 files

Tweet

gofmt100%

Gofmt formats Go programs. We run gofmt -s on your code, where -s is for the "simplify" command

No problems detected. Good job!


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.

    • rpc/client_test.go
    • Line 350: warning: cyclomatic complexity 20 of function TestClientTarget() is high (> 15) (gocyclo)
    • Line 14: warning: cyclomatic complexity 20 of function TestClient() is high (> 15) (gocyclo)
    • Line 209: warning: cyclomatic complexity 16 of function TestClientLeastTime() is high (> 15) (gocyclo)
    • rpc/server.go
    • Line 216: warning: cyclomatic complexity 24 of function (*Server).ServeRequest() is high (> 15) (gocyclo)
    • rpc/conn.go
    • Line 201: warning: cyclomatic complexity 23 of function (*Conn).read() is high (> 15) (gocyclo)
    • rpc/transport.go
    • Line 191: warning: cyclomatic complexity 22 of function (*Transport).getConn() is high (> 15) (gocyclo)
    • Line 294: warning: cyclomatic complexity 16 of function (*Transport).run() is high (> 15) (gocyclo)
    • rpc/transport_test.go
    • Line 14: warning: cyclomatic complexity 22 of function TestTransport() is high (> 15) (gocyclo)
    • Line 234: warning: cyclomatic complexity 16 of function TestGetConn() is high (> 15) (gocyclo)

golint87%

Golint is a linter for Go source code.

    • rpc/benchmarks/client/client/client/client.go
    • Line 43: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 47: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 58: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/codec/code/client/client.go
    • Line 49: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 53: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/options/client/client.go
    • Line 46: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 50: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 61: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/poll/client/client.go
    • Line 49: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 53: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/context/client/client.go
    • Line 60: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 65: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/codec/json/client/client.go
    • Line 49: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 53: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/codec/pb/client/client.go
    • Line 49: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 53: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/socket/unix/client/client.go
    • Line 49: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 53: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/tls/client/client.go
    • Line 50: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 54: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 65: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/socket/http/client/client.go
    • Line 49: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 53: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/client/conn/client/client.go
    • Line 49: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 53: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/socket/tcp/client/client.go
    • Line 49: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 53: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 64: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • rpc/benchmarks/socket/ws/client/client.go
    • Line 49: warning: exported type WrkClient should have comment or be unexported (golint)
    • Line 53: warning: exported method WrkClient.Call should have comment or be unexported (golint)
    • Line 64: 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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!