Preparing report...

Report for github.com/uber/zanzibar

A+    Excellent!    Found 24 issues across 174 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!


gocyclo91%

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.

    • zanzibar/codegen/gateway.go
    • Line 666: warning: cyclomatic complexity 28 of function augmentEndpointSpec() is high (> 15) (gocyclo)
    • Line 285: warning: cyclomatic complexity 22 of function NewEndpointSpec() is high (> 15) (gocyclo)
    • Line 599: warning: cyclomatic complexity 16 of function resolveHeaderModels() is high (> 15) (gocyclo)
    • zanzibar/codegen/method.go
    • Line 1346: warning: cyclomatic complexity 27 of function (*MethodSpec).setParseQueryParamStatements() is high (> 15) (gocyclo)
    • Line 580: warning: cyclomatic complexity 21 of function (*MethodSpec).setEndpointRequestHeaderFields() is high (> 15) (gocyclo)
    • Line 184: warning: cyclomatic complexity 16 of function NewMethod() is high (> 15) (gocyclo)
    • zanzibar/codegen/module_test.go
    • Line 2361: warning: cyclomatic complexity 34 of function compareInstances() is high (> 15) (gocyclo)
    • Line 1212: warning: cyclomatic complexity 24 of function TestExampleServiceIncrementalSelective() is high (> 15) (gocyclo)
    • Line 544: warning: cyclomatic complexity 20 of function TestExampleServiceIncremental() is high (> 15) (gocyclo)
    • Line 152: warning: cyclomatic complexity 18 of function TestExampleService() is high (> 15) (gocyclo)
    • Line 942: warning: cyclomatic complexity 17 of function TestExampleServiceIncrementalSkip() is high (> 15) (gocyclo)
    • zanzibar/codegen/thrift.go
    • Line 31: warning: cyclomatic complexity 21 of function GoType() is high (> 15) (gocyclo)
    • Line 189: warning: cyclomatic complexity 19 of function walkFieldGroupsInternal() is high (> 15) (gocyclo)
    • zanzibar/codegen/type_converter.go
    • Line 651: warning: cyclomatic complexity 41 of function (*TypeConverter).genStructConverter() is high (> 15) (gocyclo)
    • Line 440: warning: cyclomatic complexity 25 of function (*TypeConverter).genConverterForMap() is high (> 15) (gocyclo)
    • Line 267: warning: cyclomatic complexity 20 of function (*TypeConverter).genConverterForList() is high (> 15) (gocyclo)

golint97%

Golint is a linter for Go source code.

    • zanzibar/config/config.go
    • Line 35: warning: exported type RoutingConfig should have comment or be unexported (golint)
    • Line 42: warning: exported type ServiceRouting should have comment or be unexported (golint)
    • Line 47: warning: exported type AlternateServiceDetail should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign98%

IneffAssign detects ineffectual assignments in Go code.


misspell98%

Misspell Finds commonly misspelled English words