Preparing report...

Report for github.com/pressly/chi

A+    Excellent!    Found 8 issues across 62 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!


golint93%

Golint is a linter for Go source code.

    • chi/middleware/recoverer.go
    • Line 43: warning: exported function PrintPrettyStack should have comment or be unexported (golint)
    • Line 110: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • chi/middleware/route_headers.go
    • Line 51: warning: exported type HeaderRouter should have comment or be unexported (golint)
    • Line 53: warning: exported method HeaderRouter.Route should have comment or be unexported (golint)
    • Line 63: warning: exported method HeaderRouter.RouteAny should have comment or be unexported (golint)
    • Line 77: warning: exported method HeaderRouter.RouteDefault should have comment or be unexported (golint)
    • Line 82: warning: exported method HeaderRouter.Handler should have comment or be unexported (golint)
    • Line 114: warning: exported type HeaderRoute should have comment or be unexported (golint)
    • Line 120: warning: exported method HeaderRoute.IsMatch should have comment or be unexported (golint)
    • Line 133: warning: exported type Pattern should have comment or be unexported (golint)
    • Line 139: warning: exported function NewPattern should have comment or be unexported (golint)
    • Line 151: warning: exported method Pattern.Match should have comment or be unexported (golint)
    • Line 155: warning: if block ends with a return statement, so drop this else and outdent its block (golint)

gocyclo93%

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.

    • chi/tree.go
    • Line 387: warning: cyclomatic complexity 32 of function (*node).findRoute() is high (> 15) (gocyclo)
    • Line 663: warning: cyclomatic complexity 18 of function patNextSegment() is high (> 15) (gocyclo)
    • chi/mux_test.go
    • Line 18: warning: cyclomatic complexity 20 of function TestMuxBasic() is high (> 15) (gocyclo)
    • Line 758: warning: cyclomatic complexity 16 of function TestMuxBig() is high (> 15) (gocyclo)
    • chi/mux.go
    • Line 282: warning: cyclomatic complexity 17 of function (*Mux).Mount() is high (> 15) (gocyclo)

ineffassign100%

IneffAssign detects ineffectual assignments in Go code.

No problems detected. Good job!


license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!