Preparing report...

Report for github.jparrowsec.cn/goadesign/goa

(v2.2.5+incompatible)

A+    Excellent!    Found 94 issues across 296 files

Tweet

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!


gofmt78%

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


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

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.

    • expr/grpc_endpoint.go
    • Line 206: warning: cyclomatic complexity 34 of function (*GRPCEndpointExpr).Finalize() is high (> 15) (gocyclo)
    • Line 119: warning: cyclomatic complexity 22 of function (*GRPCEndpointExpr).Validate() is high (> 15) (gocyclo)
    • Line 493: warning: cyclomatic complexity 17 of function (*GRPCEndpointExpr).hasAnyType() is high (> 15) (gocyclo)
    • expr/http_endpoint.go
    • Line 303: warning: cyclomatic complexity 107 of function (*HTTPEndpointExpr).Validate() is high (> 15) (gocyclo)
    • Line 178: warning: cyclomatic complexity 29 of function (*HTTPEndpointExpr).Prepare() is high (> 15) (gocyclo)
    • Line 687: warning: cyclomatic complexity 17 of function (*HTTPEndpointExpr).validateParams() is high (> 15) (gocyclo)
    • codegen/validation.go
    • Line 58: warning: cyclomatic complexity 34 of function ValidationCode() is high (> 15) (gocyclo)
    • Line 181: warning: cyclomatic complexity 23 of function recurseValidationCode() is high (> 15) (gocyclo)
    • grpc/middleware/xray/middleware_test.go
    • Line 508: warning: cyclomatic complexity 31 of function TestStreamClient() is high (> 15) (gocyclo)
    • Line 108: warning: cyclomatic complexity 30 of function TestUnaryServerMiddleware() is high (> 15) (gocyclo)
    • Line 253: warning: cyclomatic complexity 30 of function TestStreamServerMiddleware() is high (> 15) (gocyclo)
    • Line 399: warning: cyclomatic complexity 17 of function TestUnaryClient() is high (> 15) (gocyclo)
    • expr/types.go
    • Line 362: warning: cyclomatic complexity 20 of function (Primitive).IsCompatible() is high (> 15) (gocyclo)
    • Line 687: warning: cyclomatic complexity 18 of function toReflectType() is high (> 15) (gocyclo)
    • expr/grpc_response.go
    • Line 64: warning: cyclomatic complexity 26 of function (*GRPCResponseExpr).Validate() is high (> 15) (gocyclo)
    • Line 136: warning: cyclomatic complexity 16 of function (*GRPCResponseExpr).Finalize() is high (> 15) (gocyclo)
    • http/codegen/openapi/v2/builder.go
    • Line 504: warning: cyclomatic complexity 41 of function buildPathFromExpr() is high (> 15) (gocyclo)
    • Line 16: warning: cyclomatic complexity 19 of function NewV2() is high (> 15) (gocyclo)
    • Line 147: warning: cyclomatic complexity 16 of function securitySpecFromExpr() is high (> 15) (gocyclo)
    • validation.go
    • Line 86: warning: cyclomatic complexity 21 of function ValidateFormat() is high (> 15) (gocyclo)
    • dsl/http.go
    • Line 877: warning: cyclomatic complexity 19 of function Body() is high (> 15) (gocyclo)
    • eval/context.go
    • Line 74: warning: cyclomatic complexity 16 of function (*DSLContext).Roots() is high (> 15) (gocyclo)
    • http/codegen/openapi/v3/types.go
    • Line 136: warning: cyclomatic complexity 25 of function (*schemafier).schemafy() is high (> 15) (gocyclo)
    • Line 62: warning: cyclomatic complexity 22 of function buildBodyTypes() is high (> 15) (gocyclo)
    • codegen/scope.go
    • Line 98: warning: cyclomatic complexity 18 of function (*NameScope).GoTypeDef() is high (> 15) (gocyclo)
    • codegen/import.go
    • Line 63: warning: cyclomatic complexity 18 of function safelyGetMetaTypeImports() is high (> 15) (gocyclo)
    • http/codegen/service_data.go
    • Line 930: warning: cyclomatic complexity 60 of function buildPayloadData() is high (> 15) (gocyclo)
    • Line 1408: warning: cyclomatic complexity 45 of function buildResponses() is high (> 15) (gocyclo)
    • Line 564: warning: cyclomatic complexity 43 of function (ServicesData).analyze() is high (> 15) (gocyclo)
    • Line 1680: warning: cyclomatic complexity 32 of function buildErrorsData() is high (> 15) (gocyclo)
    • Line 2031: warning: cyclomatic complexity 26 of function buildResponseBodyType() is high (> 15) (gocyclo)
    • codegen/service/service_data.go
    • Line 475: warning: cyclomatic complexity 22 of function (ServicesData).analyze() is high (> 15) (gocyclo)
    • Line 886: warning: cyclomatic complexity 17 of function BuildSchemeData() is high (> 15) (gocyclo)
    • Line 1510: warning: cyclomatic complexity 16 of function buildConstructorCode() is high (> 15) (gocyclo)
    • Line 712: warning: cyclomatic complexity 16 of function buildMethodData() is high (> 15) (gocyclo)
    • expr/attribute.go
    • Line 523: warning: cyclomatic complexity 18 of function (*AttributeExpr).debug() is high (> 15) (gocyclo)
    • Line 178: warning: cyclomatic complexity 16 of function (*AttributeExpr).Validate() is high (> 15) (gocyclo)
    • Line 663: warning: cyclomatic complexity 16 of function (*ValidationExpr).Merge() is high (> 15) (gocyclo)
    • expr/method.go
    • Line 100: warning: cyclomatic complexity 43 of function (*MethodExpr).Validate() is high (> 15) (gocyclo)
    • http/encoding.go
    • Line 99: warning: cyclomatic complexity 22 of function ResponseEncoder() is high (> 15) (gocyclo)
    • codegen/service/convert.go
    • Line 349: warning: cyclomatic complexity 45 of function buildDesignType() is high (> 15) (gocyclo)
    • Line 130: warning: cyclomatic complexity 36 of function ConvertFile() is high (> 15) (gocyclo)
    • Line 618: warning: cyclomatic complexity 20 of function compatible() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell97%

Misspell Finds commonly misspelled English words

    • http/error.go
    • Line 28: warning: "Statuser" is a misspelling of "Stature" (misspell)
    • Line 30: warning: "Statuser" is a misspelling of "Stature" (misspell)
    • Line 38: warning: "Statuser" is a misspelling of "Stature" (misspell)