Preparing report...

Report for github.com/gschier/hemlock

A+    Excellent!    Found 21 issues across 31 files

Tweet

gofmt100%

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

No problems detected. Good job!


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!


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.


golint35%

Golint is a linter for Go source code.

    • hemlock/internal/container/container.go
    • Line 9: warning: exported type Container should have comment or be unexported (golint)
    • Line 15: warning: exported function New should have comment or be unexported (golint)
    • Line 22: warning: exported function Clone should have comment or be unexported (golint)
    • Line 50: warning: exported method Container.Make should have comment or be unexported (golint)
    • Line 66: warning: exported method Container.Resolve should have comment or be unexported (golint)
    • Line 81: warning: exported method Container.Call should have comment or be unexported (golint)
    • Line 177: warning: exported method Container.FindServiceWrapperByValue should have comment or be unexported (golint)
    • hemlock/providers/context_provider.go
    • Line 9: warning: exported type ContextProvider should have comment or be unexported (golint)
    • Line 11: warning: exported method ContextProvider.Register should have comment or be unexported (golint)
    • Line 19: warning: exported method ContextProvider.Boot should have comment or be unexported (golint)
    • hemlock/internal/templates/renderer.go
    • Line 15: warning: exported type Renderer should have comment or be unexported (golint)
    • Line 22: warning: exported function NewRenderer should have comment or be unexported (golint)
    • Line 26: warning: exported method Renderer.Init should have comment or be unexported (golint)
    • Line 98: warning: exported method Renderer.RenderString should have comment or be unexported (golint)
    • Line 107: warning: exported method Renderer.RenderPartial should have comment or be unexported (golint)
    • Line 122: warning: exported method Renderer.RenderTemplate should have comment or be unexported (golint)
    • Line 124: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 133: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 138: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 143: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • hemlock/internal/router/request.go
    • Line 13: warning: exported type Request should have comment or be unexported (golint)
    • Line 21: warning: exported method Request.URL should have comment or be unexported (golint)
    • Line 25: warning: exported method Request.Header should have comment or be unexported (golint)
    • Line 29: warning: exported method Request.Host should have comment or be unexported (golint)
    • Line 33: warning: exported method Request.Path should have comment or be unexported (golint)
    • Line 37: warning: exported method Request.Method should have comment or be unexported (golint)
    • Line 41: warning: exported method Request.RouteName should have comment or be unexported (golint)
    • Line 49: warning: exported method Request.Query should have comment or be unexported (golint)
    • Line 53: warning: exported method Request.QueryInt should have comment or be unexported (golint)
    • Line 61: warning: exported method Request.WithContext should have comment or be unexported (golint)
    • Line 65: warning: exported method Request.Post should have comment or be unexported (golint)
    • Line 70: warning: exported method Request.Cookie should have comment or be unexported (golint)
    • Line 74: warning: exported method Request.File should have comment or be unexported (golint)
    • Line 78: warning: exported method Request.Context should have comment or be unexported (golint)
    • hemlock/internal/router/router.go
    • Line 24: warning: exported type Router should have comment or be unexported (golint)
    • Line 32: warning: exported function NewRouter should have comment or be unexported (golint)
    • Line 36: warning: exported function NewRouterWithMux should have comment or be unexported (golint)
    • Line 70: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 119: warning: exported method Router.Redirect should have comment or be unexported (golint)
    • Line 123: warning: exported method Router.View should have comment or be unexported (golint)
    • Line 127: warning: exported method Router.Callback should have comment or be unexported (golint)
    • Line 131: warning: exported method Router.Get should have comment or be unexported (golint)
    • Line 135: warning: exported method Router.Post should have comment or be unexported (golint)
    • Line 139: warning: exported method Router.Put should have comment or be unexported (golint)
    • Line 143: warning: exported method Router.Patch should have comment or be unexported (golint)
    • Line 147: warning: exported method Router.Delete should have comment or be unexported (golint)
    • Line 151: warning: exported method Router.Options should have comment or be unexported (golint)
    • Line 155: warning: exported method Router.Head should have comment or be unexported (golint)
    • Line 159: warning: exported method Router.Connect should have comment or be unexported (golint)
    • Line 163: warning: exported method Router.Trace should have comment or be unexported (golint)
    • Line 167: warning: exported method Router.Any should have comment or be unexported (golint)
    • Line 171: warning: exported method Router.Match should have comment or be unexported (golint)
    • Line 175: warning: exported method Router.Methods should have comment or be unexported (golint)
    • Line 179: warning: exported method Router.Prefix should have comment or be unexported (golint)
    • Line 183: warning: exported method Router.Host should have comment or be unexported (golint)
    • Line 187: warning: exported method Router.With should have comment or be unexported (golint)
    • Line 193: warning: exported method Router.WithG should have comment or be unexported (golint)
    • Line 199: warning: exported method Router.Use should have comment or be unexported (golint)
    • Line 207: warning: exported method Router.UseG should have comment or be unexported (golint)
    • Line 220: warning: exported method Router.Route should have comment or be unexported (golint)
    • Line 239: warning: exported method Router.URL should have comment or be unexported (golint)
    • hemlock/support/providers/route_provider.go
    • Line 9: warning: exported type RouteProvider should have comment or be unexported (golint)
    • Line 11: warning: exported method RouteProvider.Register should have comment or be unexported (golint)
    • Line 17: warning: exported method RouteProvider.Boot should have comment or be unexported (golint)
    • hemlock/providers/template_funcs_provider.go
    • Line 10: warning: exported type TemplateFuncsProvider should have comment or be unexported (golint)
    • Line 12: warning: exported method TemplateFuncsProvider.Register should have comment or be unexported (golint)
    • Line 18: warning: exported method TemplateFuncsProvider.Boot should have comment or be unexported (golint)
    • hemlock/internal/router/result.go
    • Line 19: warning: exported type Result should have comment or be unexported (golint)
    • Line 44: warning: exported method Result.Redirect should have comment or be unexported (golint)
    • Line 49: warning: exported method Result.RedirectRoute should have comment or be unexported (golint)
    • Line 71: warning: exported method Result.Sprintf should have comment or be unexported (golint)
    • Line 75: warning: exported method Result.View should have comment or be unexported (golint)
    • Line 91: warning: exported method Result.Data should have comment or be unexported (golint)
    • hemlock/internal/router/route.go
    • Line 11: warning: exported type Route should have comment or be unexported (golint)
    • Line 16: warning: exported function NewRoute should have comment or be unexported (golint)
    • Line 20: warning: exported method Route.Redirect should have comment or be unexported (golint)
    • Line 26: warning: exported method Route.View should have comment or be unexported (golint)
    • Line 32: warning: exported method Route.Callback should have comment or be unexported (golint)
    • Line 37: warning: exported method Route.Get should have comment or be unexported (golint)
    • Line 41: warning: exported method Route.Post should have comment or be unexported (golint)
    • Line 45: warning: exported method Route.Put should have comment or be unexported (golint)
    • Line 49: warning: exported method Route.Patch should have comment or be unexported (golint)
    • Line 53: warning: exported method Route.Delete should have comment or be unexported (golint)
    • Line 57: warning: exported method Route.Options should have comment or be unexported (golint)
    • Line 61: warning: exported method Route.Head should have comment or be unexported (golint)
    • Line 65: warning: exported method Route.Connect should have comment or be unexported (golint)
    • Line 69: warning: exported method Route.Trace should have comment or be unexported (golint)
    • Line 73: warning: exported method Route.Any should have comment or be unexported (golint)
    • Line 77: warning: exported method Route.Match should have comment or be unexported (golint)
    • Line 81: warning: exported method Route.Methods should have comment or be unexported (golint)
    • Line 86: warning: exported method Route.Host should have comment or be unexported (golint)
    • Line 91: warning: exported method Route.Prefix should have comment or be unexported (golint)
    • Line 96: warning: exported method Route.Name should have comment or be unexported (golint)
    • Line 101: warning: exported method Route.Use should have comment or be unexported (golint)
    • Line 105: warning: exported method Route.UseG should have comment or be unexported (golint)
    • Line 109: warning: exported method Route.With should have comment or be unexported (golint)
    • Line 113: warning: exported method Route.WithG should have comment or be unexported (golint)
    • Line 117: warning: exported method Route.Group should have comment or be unexported (golint)
    • hemlock/testutil/providers.go
    • Line 8: warning: exported function NewTestApplication should have comment or be unexported (golint)
    • Line 14: warning: exported type CarServiceInterface should have comment or be unexported (golint)
    • Line 18: warning: exported type CarService should have comment or be unexported (golint)
    • Line 22: warning: exported method CarService.Honk should have comment or be unexported (golint)
    • Line 30: warning: exported type CarServiceProvider should have comment or be unexported (golint)
    • Line 34: warning: exported method CarServiceProvider.Register should have comment or be unexported (golint)
    • Line 40: warning: exported method CarServiceProvider.Boot should have comment or be unexported (golint)
    • Line 44: warning: exported type StringServiceProvider should have comment or be unexported (golint)
    • Line 46: warning: exported method StringServiceProvider.Register should have comment or be unexported (golint)
    • Line 52: warning: exported method StringServiceProvider.Boot should have comment or be unexported (golint)
    • hemlock/interfaces/interfaces.go
    • Line 22: warning: comment on exported type Request should be of the form "Request ..." (with optional leading article) (golint)
    • Line 101: warning: exported type Result should have comment or be unexported (golint)
    • Line 164: warning: exported type RouteParams should have comment or be unexported (golint)
    • hemlock/internal/cli/cli.go
    • Line 9: warning: exported var Cmd should have comment or be unexported (golint)
    • Line 10: warning: exported var Command should have comment or be unexported (golint)
    • Line 12: warning: exported var UI should have comment or be unexported (golint)
    • hemlock/providers/http_provider.go
    • Line 9: warning: exported type HttpProvider should have comment or be unexported (golint)
    • Line 11: warning: exported method HttpProvider.Register should have comment or be unexported (golint)
    • Line 19: warning: exported method HttpProvider.Boot should have comment or be unexported (golint)
    • hemlock/providers/templates_provider.go
    • Line 10: warning: exported type TemplatesProvider should have comment or be unexported (golint)
    • Line 12: warning: exported method TemplatesProvider.Register should have comment or be unexported (golint)
    • Line 30: warning: exported method TemplatesProvider.Boot should have comment or be unexported (golint)
    • hemlock/application.go
    • Line 17: warning: exported type Application should have comment or be unexported (golint)
    • Line 23: warning: exported function NewApplication should have comment or be unexported (golint)
    • Line 75: warning: exported function CloneApplication should have comment or be unexported (golint)
    • Line 85: warning: exported method Application.Start should have comment or be unexported (golint)
    • Line 102: warning: exported method Application.Bind should have comment or be unexported (golint)
    • Line 106: warning: exported method Application.Singleton should have comment or be unexported (golint)
    • Line 110: warning: exported method Application.Instance should have comment or be unexported (golint)
    • Line 125: warning: exported method Application.ResolveInto should have comment or be unexported (golint)
    • Line 129: warning: exported method Application.Make should have comment or be unexported (golint)
    • Line 133: warning: exported method Application.Resolve should have comment or be unexported (golint)
    • Line 139: warning: exported method Application.IsDev should have comment or be unexported (golint)
    • Line 143: warning: exported method Application.IsProd should have comment or be unexported (golint)
    • Line 147: warning: exported method Application.Env should have comment or be unexported (golint)
    • Line 151: warning: exported method Application.EnvOr should have comment or be unexported (golint)
    • hemlock/internal/router/response.go
    • Line 9: warning: exported type Response should have comment or be unexported (golint)
    • Line 34: warning: exported method Response.Cookie should have comment or be unexported (golint)
    • Line 39: warning: exported method Response.Status should have comment or be unexported (golint)
    • Line 48: warning: exported method Response.Header should have comment or be unexported (golint)
    • Line 53: warning: exported method Response.View should have comment or be unexported (golint)
    • Line 57: warning: exported method Response.Data should have comment or be unexported (golint)
    • Line 65: warning: exported method Response.Sprintf should have comment or be unexported (golint)
    • Line 69: warning: exported method Response.Redirect should have comment or be unexported (golint)
    • Line 73: warning: exported method Response.RedirectRoute should have comment or be unexported (golint)
    • Line 77: warning: exported method Response.End should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign96%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!