Preparing report...

Report for github.com/dedefer/kin-openapi

(v0.98.1)

A+    Excellent!    Found 19 issues across 133 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!


gofmt100%

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

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


gocyclo86%

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.

    • jsoninfo/unmarshal.go
    • Line 41: warning: cyclomatic complexity 23 of function (*ObjectDecoder).DecodeStructFieldsAndExtensions() is high (> 15) (gocyclo)
    • openapi3/parameter.go
    • Line 249: warning: cyclomatic complexity 47 of function (*Parameter).Validate() is high (> 15) (gocyclo)
    • Line 179: warning: cyclomatic complexity 16 of function (Parameter).JSONLookup() is high (> 15) (gocyclo)
    • openapi3/loader.go
    • Line 670: warning: cyclomatic complexity 26 of function (*Loader).resolveSchemaRef() is high (> 15) (gocyclo)
    • Line 600: warning: cyclomatic complexity 22 of function (*Loader).resolveResponseRef() is high (> 15) (gocyclo)
    • Line 823: warning: cyclomatic complexity 21 of function (*Loader).resolveCallbackRef() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 21 of function (*Loader).ResolveRefsIn() is high (> 15) (gocyclo)
    • Line 337: warning: cyclomatic complexity 20 of function drillIntoField() is high (> 15) (gocyclo)
    • Line 487: warning: cyclomatic complexity 19 of function (*Loader).resolveParameterRef() is high (> 15) (gocyclo)
    • Line 256: warning: cyclomatic complexity 18 of function (*Loader).resolveComponent() is high (> 15) (gocyclo)
    • Line 545: warning: cyclomatic complexity 17 of function (*Loader).resolveRequestBodyRef() is high (> 15) (gocyclo)
    • openapi2conv/openapi2_conv.go
    • Line 578: warning: cyclomatic complexity 28 of function FromV3() is high (> 15) (gocyclo)
    • Line 16: warning: cyclomatic complexity 23 of function ToV3() is high (> 15) (gocyclo)
    • Line 214: warning: cyclomatic complexity 17 of function ToV3Parameter() is high (> 15) (gocyclo)
    • Line 368: warning: cyclomatic complexity 16 of function onlyOneReqBodyParam() is high (> 15) (gocyclo)
    • openapi3filter/req_resp_decoder.go
    • Line 245: warning: cyclomatic complexity 26 of function decodeValue() is high (> 15) (gocyclo)
    • Line 983: warning: cyclomatic complexity 21 of function multipartBodyDecoder() is high (> 15) (gocyclo)
    • Line 408: warning: cyclomatic complexity 18 of function (*pathParamDecoder).DecodeObject() is high (> 15) (gocyclo)
    • openapi3/schema.go
    • Line 602: warning: cyclomatic complexity 52 of function (*Schema).validate() is high (> 15) (gocyclo)
    • Line 1357: warning: cyclomatic complexity 47 of function (*Schema).visitJSONObject() is high (> 15) (gocyclo)
    • Line 181: warning: cyclomatic complexity 44 of function (Schema).JSONLookup() is high (> 15) (gocyclo)
    • Line 551: warning: cyclomatic complexity 38 of function (*Schema).IsEmpty() is high (> 15) (gocyclo)
    • Line 838: warning: cyclomatic complexity 38 of function (*Schema).visitSetOperations() is high (> 15) (gocyclo)
    • Line 1142: warning: cyclomatic complexity 33 of function (*Schema).visitJSONString() is high (> 15) (gocyclo)
    • Line 1019: warning: cyclomatic complexity 28 of function (*Schema).visitJSONNumber() is high (> 15) (gocyclo)
    • Line 1261: warning: cyclomatic complexity 23 of function (*Schema).visitJSONArray() is high (> 15) (gocyclo)
    • Line 788: warning: cyclomatic complexity 16 of function (*Schema).visitJSON() is high (> 15) (gocyclo)
    • jsoninfo/marshal.go
    • Line 56: warning: cyclomatic complexity 38 of function (*ObjectEncoder).EncodeStructFieldsAndExtensions() 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