Preparing report...

Report for hidevops.io/hiboot

A    Great!    Found 144 issues across 305 files

Tweet

gofmt57%

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!


golint83%

Golint is a linter for Go source code.

    • /hidevops.io/hiboot/pkg/starter/grpc/health.go
    • Line 10: warning: comment on exported type HealthCheckService should be of the form "HealthCheckService ..." (with optional leading article) (golint)
    • Line 24: warning: comment on exported method HealthCheckService.Name should be of the form "Name ..." (golint)
    • /hidevops.io/hiboot/pkg/starter/jaeger/span.go
    • Line 19: warning: comment on exported type ChildSpan should be of the form "ChildSpan ..." (with optional leading article) (golint)
    • Line 23: warning: exported method Span.Inject should have comment or be unexported (golint)
    • Line 40: warning: exported method ChildSpan.Inject should have comment or be unexported (golint)
    • /hidevops.io/hiboot/examples/web/middleware/controller/controller.go
    • Line 12: warning: exported type UserController should have comment or be unexported (golint)
    • Line 26: warning: exported type User should have comment or be unexported (golint)
    • Line 32: warning: exported type UserRequests should have comment or be unexported (golint)
    • Line 47: warning: exported type UserResponse should have comment or be unexported (golint)
    • Line 53: warning: exported type ListUserResponse should have comment or be unexported (golint)
    • Line 59: warning: comment on exported method UserController.GetUser should be of the form "GetUser ..." (golint)
    • Line 60: warning: context.Context should be the first parameter of a function (golint)
    • Line 74: warning: comment on exported method UserController.GetUserByName should be of the form "GetUserByName ..." (golint)
    • Line 87: warning: comment on exported method UserController.GetUserQuery should be of the form "GetUserQuery ..." (golint)
    • Line 88: warning: context.Context should be the first parameter of a function (golint)
    • Line 103: warning: comment on exported method UserController.GetUsers should be of the form "GetUsers ..." (golint)
    • Line 104: warning: context.Context should be the first parameter of a function (golint)
    • Line 119: warning: comment on exported method UserController.DeleteUser should be of the form "DeleteUser ..." (golint)
    • /hidevops.io/hiboot/pkg/at/swagger.go
    • Line 32: warning: comment on exported type Tags should be of the form "Tags ..." (with optional leading article) (golint)
    • Line 41: warning: comment on exported type ExternalDocs should be of the form "ExternalDocs ..." (with optional leading article) (golint)
    • Line 51: warning: comment on exported type Parameter should be of the form "Parameter ..." (with optional leading article) (golint)
    • /hidevops.io/hiboot/examples/web/router/main.go
    • Line 42: warning: comment on exported type UserVO should be of the form "UserVO ..." (with optional leading article) (golint)
    • Line 50: warning: comment on exported type User should be of the form "User ..." (with optional leading article) (golint)
    • Line 57: warning: comment on exported type UserRequest should be of the form "UserRequest ..." (with optional leading article) (golint)
    • Line 63: warning: comment on exported type UserResponse should be of the form "UserResponse ..." (with optional leading article) (golint)
    • Line 73: warning: comment on exported method UserController.CreateUser should be of the form "CreateUser ..." (golint)
    • Line 90: warning: comment on exported method UserController.GetUserByPathVariable should be of the form "GetUserByPathVariable ..." (golint)
    • Line 107: warning: comment on exported method UserController.Patch should be of the form "Patch ..." (golint)
    • Line 116: warning: comment on exported method UserController.DeleteUser should be of the form "DeleteUser ..." (golint)
    • Line 124: warning: comment on exported method UserController.ListUser should be of the form "ListUser ..." (golint)
    • /hidevops.io/hiboot/pkg/starter/swagger/info_builder.go
    • Line 23: warning: exported type ApiInfoBuilderInterface should have comment or be unexported (golint)
    • Line 40: warning: exported type Contact should have comment or be unexported (golint)
    • Line 46: warning: exported type License should have comment or be unexported (golint)
    • Line 60: warning: exported function ApiInfoBuilder should have comment or be unexported (golint)
    • /hidevops.io/hiboot/pkg/inject/annotation/annotation.go
    • Line 1: warning: package comment should be of the form "Package annotation ..." (golint)
    • Line 30: warning: comment on exported type Field should be of the form "Field ..." (with optional leading article) (golint)
    • Line 36: warning: exported type Annotation should have comment or be unexported (golint)
    • Line 41: warning: exported type Annotations should have comment or be unexported (golint)
    • Line 46: warning: exported function IsAnnotation should have comment or be unexported (golint)
    • Line 167: warning: comment on exported function FilterIn should be of the form "FilterIn ..." (golint)
    • Line 208: warning: comment on exported function FindAll should be of the form "FindAll ..." (golint)
    • /hidevops.io/hiboot/pkg/utils/mapstruct/mapstruct.go
    • Line 27: warning: exported function WithAnnotation should have comment or be unexported (golint)
    • Line 31: warning: exported function WithSquash should have comment or be unexported (golint)
    • Line 35: warning: exported function WithWeaklyTypedInput should have comment or be unexported (golint)
    • Line 63: warning: comment on exported function DecodeStructToMap should be of the form "DecodeStructToMap ..." (golint)
    • /hidevops.io/hiboot/pkg/app/web/context.go
    • Line 158: warning: comment on exported method Context.SetAnnotations should be of the form "SetAnnotations ..." (golint)
    • Line 163: warning: comment on exported method Context.Annotations should be of the form "Annotations ..." (golint)
    • Line 168: warning: comment on exported method Context.SetURLParam should be of the form "SetURLParam ..." (golint)
    • /hidevops.io/hiboot/examples/web/swagger/simple-server/main.go
    • Line 19: warning: exported type Asset should have comment or be unexported (golint)
    • Line 27: warning: exported type Manager should have comment or be unexported (golint)
    • Line 32: warning: exported type Employee should have comment or be unexported (golint)
    • Line 40: warning: exported type ResponseInfo should have comment or be unexported (golint)
    • Line 46: warning: exported type UpdateEmployeeRequest should have comment or be unexported (golint)
    • Line 52: warning: exported type CreateEmployeeRequest should have comment or be unexported (golint)
    • Line 58: warning: exported type EmployeeResponse should have comment or be unexported (golint)
    • Line 66: warning: exported type ListEmployeeResponse should have comment or be unexported (golint)
    • Line 100: warning: context.Context should be the first parameter of a function (golint)
    • Line 107: warning: exported type Foo should have comment or be unexported (golint)
    • Line 117: warning: exported type Bar should have comment or be unexported (golint)
    • Line 356: warning: context.Context should be the first parameter of a function (golint)
    • Line 382: warning: context.Context should be the first parameter of a function (golint)
    • /hidevops.io/hiboot/pkg/app/web/dispatcher.go
    • Line 51: warning: exported const Any should have comment (or a comment on this block) or be unexported (golint)
    • Line 57: warning: exported type Dispatcher should have comment or be unexported (golint)
    • Line 93: warning: exported type Annotations should have comment or be unexported (golint)

gocyclo96%

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.

    • /hidevops.io/hiboot/pkg/app/web/handler.go
    • Line 278: warning: cyclomatic complexity 21 of function (*handler).responseData() is high (> 15) (gocyclo)
    • Line 133: warning: cyclomatic complexity 20 of function (*handler).parseMethod() is high (> 15) (gocyclo)
    • Line 370: warning: cyclomatic complexity 17 of function (*handler).call() is high (> 15) (gocyclo)

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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!