Preparing report...

Report for github.com/donutloop/trixie

A    Great!    Found 9 issues across 13 files

Tweet

gofmt92%

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!


gocyclo92%

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.

    • trixie/tree.go
    • Line 50: warning: cyclomatic complexity 18 of function (*Tree).Insert() is high (> 15) (gocyclo)

golint30%

Golint is a linter for Go source code.

    • trixie/context.go
    • Line 25: warning: comment on exported function GetCurrentRoute should be of the form "GetCurrentRoute ..." (golint)
    • Line 39: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 42: warning: comment on exported function AddRouteParameters should be of the form "AddRouteParameters ..." (golint)
    • Line 44: warning: should not use basic type string as key in context.WithValue (golint)
    • Line 47: warning: comment on exported function GetRouteParameters should be of the form "GetRouteParameters ..." (golint)
    • trixie/tree.go
    • Line 18: warning: exported type Tree should have comment or be unexported (golint)
    • Line 40: warning: exported method Tree.GetRoot should have comment or be unexported (golint)
    • Line 215: warning: exported function NodeOfType should have comment or be unexported (golint)
    • trixie/validator.go
    • Line 11: warning: exported function NewPathValidator should have comment or be unexported (golint)
    • Line 31: warning: exported function NewMethodValidator should have comment or be unexported (golint)
    • Line 46: warning: exported var Validatoren should have comment or be unexported (golint)
    • trixie/middleware/urlquery.go
    • Line 54: warning: exported type Queries should have comment or be unexported (golint)
    • Line 66: warning: comment on exported method Queries.GetAll should be of the form "GetAll ..." (golint)
    • trixie/route.go
    • Line 7: warning: exported type Handlers should have comment or be unexported (golint)
    • Line 9: warning: exported type RouteInterface should have comment or be unexported (golint)
    • Line 20: warning: exported function NewRoute should have comment or be unexported (golint)
    • Line 26: warning: exported type Route should have comment or be unexported (golint)
    • Line 31: warning: exported method Route.AddHandlerFunc should have comment or be unexported (golint)
    • Line 36: warning: exported method Route.AddHandler should have comment or be unexported (golint)
    • Line 41: warning: exported method Route.GetHandler should have comment or be unexported (golint)
    • Line 45: warning: exported method Route.AddHandlers should have comment or be unexported (golint)
    • Line 54: warning: exported method Route.GetHandlers should have comment or be unexported (golint)
    • Line 58: warning: exported method Route.SetPattern should have comment or be unexported (golint)
    • Line 63: warning: exported method Route.GetPattern should have comment or be unexported (golint)
    • Line 67: warning: exported method Route.HasHandler should have comment or be unexported (golint)
    • trixie/router.go
    • Line 152: warning: exported method Router.ValidateRoute should have comment or be unexported (golint)
    • Line 252: warning: exported method Router.Path should have comment or be unexported (golint)
    • Line 261: warning: exported var Methods should have comment or be unexported (golint)
    • trixie/middleware/chain.go
    • Line 5: warning: exported type ContextKey should have comment or be unexported (golint)
    • Line 7: warning: exported type Middleware should have comment or be unexported (golint)
    • Line 17: warning: comment on exported function Stack should be of the form "Stack ..." (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!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!