Preparing report...

Report for github.com/pangpanglabs/echoswagger

A    Great!    Found 12 issues across 21 files

Tweet

gofmt90%

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!


gocyclo90%

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.

    • echoswagger/tag.go
    • Line 54: warning: cyclomatic complexity 19 of function (*Parameter).handleSwaggerTags() is high (> 15) (gocyclo)
    • Line 125: warning: cyclomatic complexity 18 of function (*JSONSchema).handleSwaggerTags() is high (> 15) (gocyclo)
    • Line 197: warning: cyclomatic complexity 16 of function (*Header).handleSwaggerTags() is high (> 15) (gocyclo)

golint52%

Golint is a linter for Go source code.

    • echoswagger/tag.go
    • Line 49: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • echoswagger/wrapper.go
    • Line 22: warning: exported type ApiRouter should have comment or be unexported (golint)
    • Line 49: warning: exported type ApiRoot should have comment or be unexported (golint)
    • Line 96: warning: exported type ApiGroup should have comment or be unexported (golint)
    • Line 119: warning: exported type Api should have comment or be unexported (golint)
    • Line 197: warning: exported type Root should have comment or be unexported (golint)
    • Line 251: warning: exported method Root.Add should have comment or be unexported (golint)
    • Line 255: warning: exported method Root.GET should have comment or be unexported (golint)
    • Line 259: warning: exported method Root.POST should have comment or be unexported (golint)
    • Line 263: warning: exported method Root.PUT should have comment or be unexported (golint)
    • Line 267: warning: exported method Root.DELETE should have comment or be unexported (golint)
    • Line 271: warning: exported method Root.OPTIONS should have comment or be unexported (golint)
    • Line 275: warning: exported method Root.HEAD should have comment or be unexported (golint)
    • Line 279: warning: exported method Root.PATCH should have comment or be unexported (golint)
    • Line 283: warning: exported method Root.Group should have comment or be unexported (golint)
    • Line 299: warning: exported method Root.BindGroup should have comment or be unexported (golint)
    • Line 314: warning: exported method Root.SetRequestContentType should have comment or be unexported (golint)
    • Line 319: warning: exported method Root.SetResponseContentType should have comment or be unexported (golint)
    • Line 324: warning: exported method Root.SetExternalDocs should have comment or be unexported (golint)
    • Line 332: warning: exported method Root.AddSecurityBasic should have comment or be unexported (golint)
    • Line 344: warning: exported method Root.AddSecurityAPIKey should have comment or be unexported (golint)
    • Line 358: warning: exported method Root.AddSecurityOAuth2 should have comment or be unexported (golint)
    • Line 374: warning: exported method Root.SetUI should have comment or be unexported (golint)
    • Line 379: warning: exported method Root.SetScheme should have comment or be unexported (golint)
    • Line 389: warning: exported method Root.GetRaw should have comment or be unexported (golint)
    • Line 393: warning: exported method Root.SetRaw should have comment or be unexported (golint)
    • Line 398: warning: exported method Root.Echo should have comment or be unexported (golint)
    • echoswagger/examples/controller_user.go
    • Line 12: warning: exported type UserController should have comment or be unexported (golint)
    • Line 14: warning: exported method UserController.Init should have comment or be unexported (golint)
    • Line 88: warning: exported method UserController.Create should have comment or be unexported (golint)
    • Line 92: warning: exported method UserController.CreateWithArray should have comment or be unexported (golint)
    • Line 96: warning: exported method UserController.CreateWithList should have comment or be unexported (golint)
    • Line 100: warning: exported method UserController.Login should have comment or be unexported (golint)
    • Line 104: warning: exported method UserController.Logout should have comment or be unexported (golint)
    • Line 108: warning: exported method UserController.GetByUsername should have comment or be unexported (golint)
    • Line 112: warning: exported method UserController.UpdateByUsername should have comment or be unexported (golint)
    • Line 116: warning: exported method UserController.DeleteByUsername should have comment or be unexported (golint)
    • echoswagger/internal.go
    • Line 13: warning: exported type ParamInType should have comment or be unexported (golint)
    • Line 16: warning: exported const ParamInQuery should have comment (or a comment on this block) or be unexported (golint)
    • Line 23: warning: exported type UISetting should have comment or be unexported (golint)
    • Line 29: warning: exported type RawDefineDic should have comment or be unexported (golint)
    • Line 31: warning: exported type RawDefine should have comment or be unexported (golint)
    • echoswagger/models.go
    • Line 299: warning: exported type JSONSchema should have comment or be unexported (golint)
    • Line 355: warning: exported type XMLSchema should have comment or be unexported (golint)
    • echoswagger/security.go
    • Line 5: warning: exported type SecurityType should have comment or be unexported (golint)
    • Line 8: warning: exported const SecurityBasic should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type SecurityInType should have comment or be unexported (golint)
    • Line 16: warning: exported const SecurityInQuery should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type OAuth2FlowType should have comment or be unexported (golint)
    • Line 23: warning: exported const OAuth2FlowImplicit should have comment (or a comment on this block) or be unexported (golint)
    • echoswagger/spec.go
    • Line 13: warning: exported const DefPrefix should have comment (or a comment on this block) or be unexported (golint)
    • Line 37: warning: comment on exported method Root.GetSpec should be of the form "GetSpec ..." (golint)
    • echoswagger/examples/controller_pet.go
    • Line 10: warning: exported type PetController should have comment or be unexported (golint)
    • Line 12: warning: exported method PetController.Init should have comment or be unexported (golint)
    • Line 123: warning: exported method PetController.Create should have comment or be unexported (golint)
    • Line 127: warning: exported method PetController.Update should have comment or be unexported (golint)
    • Line 131: warning: exported method PetController.FindByStatus should have comment or be unexported (golint)
    • Line 135: warning: exported method PetController.FindByTags should have comment or be unexported (golint)
    • Line 139: warning: exported method PetController.GetById should have comment or be unexported (golint)
    • Line 143: warning: exported method PetController.CreateById should have comment or be unexported (golint)
    • Line 147: warning: exported method PetController.DeleteById should have comment or be unexported (golint)
    • Line 151: warning: exported method PetController.UploadImageById should have comment or be unexported (golint)
    • echoswagger/examples/controller_store.go
    • Line 11: warning: exported type StoreController should have comment or be unexported (golint)
    • Line 13: warning: exported method StoreController.Init should have comment or be unexported (golint)
    • Line 63: warning: exported method StoreController.GetInventory should have comment or be unexported (golint)
    • Line 67: warning: exported method StoreController.CreateOrder should have comment or be unexported (golint)
    • Line 71: warning: exported method StoreController.GetOrderById should have comment or be unexported (golint)
    • Line 75: warning: exported method StoreController.DeleteOrderById should have comment or be unexported (golint)
    • echoswagger/assets.go
    • Line 3: warning: comment on exported const DefaultCDN should be of the form "DefaultCDN ..." (golint)
    • Line 6: warning: exported const SwaggerUIContent should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


misspell95%

Misspell Finds commonly misspelled English words