Preparing report...

Report for github.com/gozelle/openapi

(v0.0.0-20230119025534-505c123b70b7)

A    Great!    Found 75 issues across 165 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!


gofmt59%

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!


gocyclo89%

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.

    • openapi3/parameter.go
    • Line 318: warning: cyclomatic complexity 57 of function (*Parameter).Validate() is high (> 15) (gocyclo)
    • Line 248: warning: cyclomatic complexity 16 of function (Parameter).JSONLookup() is high (> 15) (gocyclo)
    • openapi2conv/openapi2_conv.go
    • Line 572: warning: cyclomatic complexity 28 of function FromV3() is high (> 15) (gocyclo)
    • Line 15: warning: cyclomatic complexity 23 of function ToV3() is high (> 15) (gocyclo)
    • Line 209: warning: cyclomatic complexity 17 of function ToV3Parameter() is high (> 15) (gocyclo)
    • Line 359: warning: cyclomatic complexity 16 of function onlyOneReqBodyParam() is high (> 15) (gocyclo)
    • Line 749: warning: cyclomatic complexity 16 of function FromV3SchemaRef() is high (> 15) (gocyclo)
    • openapi3filter/validate_request.go
    • Line 109: warning: cyclomatic complexity 24 of function ValidateParameter() is high (> 15) (gocyclo)
    • Line 32: warning: cyclomatic complexity 23 of function ValidateRequest() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 21 of function ValidateRequestBody() is high (> 15) (gocyclo)
    • openapi3/schema.go
    • Line 848: warning: cyclomatic complexity 62 of function (*Schema).validate() is high (> 15) (gocyclo)
    • Line 1729: warning: cyclomatic complexity 55 of function (*Schema).visitJSONObject() is high (> 15) (gocyclo)
    • Line 428: warning: cyclomatic complexity 44 of function (Schema).JSONLookup() is high (> 15) (gocyclo)
    • Line 1114: warning: cyclomatic complexity 43 of function (*Schema).visitSetOperations() is high (> 15) (gocyclo)
    • Line 1342: warning: cyclomatic complexity 39 of function (*Schema).visitJSONNumber() is high (> 15) (gocyclo)
    • Line 228: warning: cyclomatic complexity 39 of function (Schema).MarshalJSON() is high (> 15) (gocyclo)
    • Line 796: warning: cyclomatic complexity 38 of function (*Schema).IsEmpty() is high (> 15) (gocyclo)
    • Line 1505: warning: cyclomatic complexity 35 of function (*Schema).visitJSONString() is high (> 15) (gocyclo)
    • Line 1630: warning: cyclomatic complexity 23 of function (*Schema).visitJSONArray() is high (> 15) (gocyclo)
    • Line 1057: warning: cyclomatic complexity 19 of function (*Schema).visitJSON() is high (> 15) (gocyclo)
    • openapi3/security_scheme.go
    • Line 156: warning: cyclomatic complexity 19 of function (*SecurityScheme).Validate() is high (> 15) (gocyclo)
    • Line 373: warning: cyclomatic complexity 17 of function (*OAuthFlow).validate() is high (> 15) (gocyclo)
    • openapi3filter/req_resp_decoder.go
    • Line 1098: warning: cyclomatic complexity 30 of function multipartBodyDecoder() is high (> 15) (gocyclo)
    • Line 262: warning: cyclomatic complexity 27 of function decodeValue() is high (> 15) (gocyclo)
    • Line 428: warning: cyclomatic complexity 18 of function (*pathParamDecoder).DecodeObject() is high (> 15) (gocyclo)
    • openapi3/loader.go
    • Line 688: warning: cyclomatic complexity 27 of function (*Loader).resolveSchemaRef() is high (> 15) (gocyclo)
    • Line 185: warning: cyclomatic complexity 24 of function (*Loader).ResolveRefsIn() is high (> 15) (gocyclo)
    • Line 612: warning: cyclomatic complexity 23 of function (*Loader).resolveResponseRef() is high (> 15) (gocyclo)
    • Line 852: warning: cyclomatic complexity 22 of function (*Loader).resolveCallbackRef() is high (> 15) (gocyclo)
    • Line 493: warning: cyclomatic complexity 19 of function (*Loader).resolveParameterRef() is high (> 15) (gocyclo)
    • Line 362: warning: cyclomatic complexity 18 of function drillIntoField() is high (> 15) (gocyclo)
    • Line 551: warning: cyclomatic complexity 18 of function (*Loader).resolveRequestBodyRef() is high (> 15) (gocyclo)
    • Line 285: warning: cyclomatic complexity 18 of function (*Loader).resolveComponent() is high (> 15) (gocyclo)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell98%

Misspell Finds commonly misspelled English words