Preparing report...

Report for github.com/mwitkow/go-grpc-middleware

A+    Excellent!    Found 68 issues across 110 files

Tweet

gofmt99%

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!


gocyclo98%

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.


golint40%

Golint is a linter for Go source code.

    • go-grpc-middleware/testing/pingservice.go
    • Line 8: warning: don't use an underscore in package name (golint)
    • Line 21: warning: comment on exported const DefaultResponseValue should be of the form "DefaultResponseValue ..." (golint)
    • Line 27: warning: exported type TestPingService should have comment or be unexported (golint)
    • Line 31: warning: exported method TestPingService.PingEmpty should have comment or be unexported (golint)
    • Line 35: warning: exported method TestPingService.Ping should have comment or be unexported (golint)
    • Line 40: warning: exported method TestPingService.PingError should have comment or be unexported (golint)
    • Line 45: warning: exported method TestPingService.PingList should have comment or be unexported (golint)
    • Line 56: warning: exported method TestPingService.PingStream should have comment or be unexported (golint)
    • go-grpc-middleware/tags/context.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 61: warning: comment on exported function Extract should be of the form "Extract ..." (golint)
    • Line 72: warning: exported function SetInContext should have comment or be unexported (golint)
    • Line 76: warning: exported function NewTags should have comment or be unexported (golint)
    • go-grpc-middleware/logging/common.go
    • Line 4: warning: don't use an underscore in package name (golint)
    • Line 19: warning: exported function DefaultErrorToCode should have comment or be unexported (golint)
    • Line 40: warning: comment on exported type JsonPbMarshaler should be of the form "JsonPbMarshaler ..." (with optional leading article) (golint)
    • go-grpc-middleware/chain.go
    • Line 6: warning: don't use an underscore in package name (golint)
    • Line 150: warning: comment on exported function WithUnaryServerChain should be of the form "WithUnaryServerChain ..." (golint)
    • go-grpc-middleware/wrappers_test.go
    • Line 4: warning: don't use an underscore in package name (golint)
    • Line 17: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 21: warning: should not use basic type string as key in context.WithValue (golint)
    • go-grpc-middleware/testing/interceptor_suite.go
    • Line 4: warning: don't use an underscore in package name (golint)
    • Line 51: warning: exported method InterceptorTestSuite.SetupSuite should have comment or be unexported (golint)
    • Line 108: warning: exported method InterceptorTestSuite.RestartServer should have comment or be unexported (golint)
    • Line 114: warning: exported method InterceptorTestSuite.NewClient should have comment or be unexported (golint)
    • Line 133: warning: exported method InterceptorTestSuite.ServerAddr should have comment or be unexported (golint)
    • Line 137: warning: exported method InterceptorTestSuite.SimpleCtx should have comment or be unexported (golint)
    • Line 142: warning: exported method InterceptorTestSuite.DeadlineCtx should have comment or be unexported (golint)
    • Line 147: warning: exported method InterceptorTestSuite.TearDownSuite should have comment or be unexported (golint)
    • go-grpc-middleware/chain_test.go
    • Line 4: warning: don't use an underscore in package name (golint)
    • Line 24: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 34: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 41: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 68: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 77: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 107: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 116: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 142: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 151: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 170: warning: context.Context should be the first parameter of a function (golint)
    • go-grpc-middleware/retry/retry.go
    • Line 4: warning: don't use an underscore in package name (golint)
    • Line 22: warning: exported const AttemptMetadataKey should have comment (or a comment on this block) or be unexported (golint)
    • Line 253: warning: context.Context should be the first parameter of a function (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign99%

IneffAssign detects ineffectual assignments in Go code.


misspell99%

Misspell Finds commonly misspelled English words