Preparing report...

Report for github.com/go-macaron/macaron

A+    Excellent!    Found 11 issues across 23 files

Tweet

gofmt95%

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!


gocyclo86%

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.

    • macaron/tree.go
    • Line 306: warning: cyclomatic complexity 19 of function (*Tree).matchSubtree() is high (> 15) (gocyclo)

golint73%

Golint is a linter for Go source code.

    • macaron/render.go
    • Line 122: warning: exported type Render should have comment or be unexported (golint)
    • Line 156: warning: exported method TplFile.Name should have comment or be unexported (golint)
    • Line 160: warning: exported method TplFile.Data should have comment or be unexported (golint)
    • Line 164: warning: exported method TplFile.Ext should have comment or be unexported (golint)
    • Line 246: warning: exported method TplFileSystem.ListFiles should have comment or be unexported (golint)
    • Line 250: warning: exported method TplFileSystem.Get should have comment or be unexported (golint)
    • Line 259: warning: exported function PrepareCharset should have comment or be unexported (golint)
    • Line 267: warning: exported function GetExt should have comment or be unexported (golint)
    • Line 298: warning: exported const DEFAULT_TPL_SET_NAME should have comment (or a comment on this block) or be unexported (golint)
    • Line 316: warning: exported method TemplateSet.Set should have comment or be unexported (golint)
    • Line 327: warning: exported method TemplateSet.Get should have comment or be unexported (golint)
    • Line 334: warning: exported method TemplateSet.GetDir should have comment or be unexported (golint)
    • Line 361: warning: exported function ParseTplSet should have comment or be unexported (golint)
    • Line 424: warning: exported function Renderers should have comment or be unexported (golint)
    • Line 428: warning: exported type TplRender should have comment or be unexported (golint)
    • Line 437: warning: exported method TplRender.SetResponseWriter should have comment or be unexported (golint)
    • Line 441: warning: exported method TplRender.JSON should have comment or be unexported (golint)
    • Line 465: warning: exported method TplRender.JSONString should have comment or be unexported (golint)
    • Line 479: warning: exported method TplRender.XML should have comment or be unexported (golint)
    • Line 509: warning: exported method TplRender.RawData should have comment or be unexported (golint)
    • Line 513: warning: exported method TplRender.PlainText should have comment or be unexported (golint)
    • Line 580: warning: exported method TplRender.HTML should have comment or be unexported (golint)
    • Line 584: warning: exported method TplRender.HTMLSet should have comment or be unexported (golint)
    • Line 588: warning: exported method TplRender.HTMLSetBytes should have comment or be unexported (golint)
    • Line 596: warning: exported method TplRender.HTMLBytes should have comment or be unexported (golint)
    • Line 600: warning: exported method TplRender.HTMLSetString should have comment or be unexported (golint)
    • Line 605: warning: exported method TplRender.HTMLString should have comment or be unexported (golint)
    • Line 618: warning: exported method TplRender.Status should have comment or be unexported (golint)
    • Line 632: warning: exported method TplRender.SetTemplatePath should have comment or be unexported (golint)
    • Line 641: warning: exported method TplRender.HasTemplateSet should have comment or be unexported (golint)
    • Line 656: warning: exported method DummyRender.SetResponseWriter should have comment or be unexported (golint)
    • Line 660: warning: exported method DummyRender.JSON should have comment or be unexported (golint)
    • Line 664: warning: exported method DummyRender.JSONString should have comment or be unexported (golint)
    • Line 669: warning: exported method DummyRender.RawData should have comment or be unexported (golint)
    • Line 673: warning: exported method DummyRender.PlainText should have comment or be unexported (golint)
    • Line 677: warning: exported method DummyRender.HTML should have comment or be unexported (golint)
    • Line 681: warning: exported method DummyRender.HTMLSet should have comment or be unexported (golint)
    • Line 685: warning: exported method DummyRender.HTMLSetString should have comment or be unexported (golint)
    • Line 690: warning: exported method DummyRender.HTMLString should have comment or be unexported (golint)
    • Line 695: warning: exported method DummyRender.HTMLSetBytes should have comment or be unexported (golint)
    • Line 700: warning: exported method DummyRender.HTMLBytes should have comment or be unexported (golint)
    • Line 705: warning: exported method DummyRender.XML should have comment or be unexported (golint)
    • Line 713: warning: exported method DummyRender.Status should have comment or be unexported (golint)
    • Line 717: warning: exported method DummyRender.SetTemplatePath should have comment or be unexported (golint)
    • Line 721: warning: exported method DummyRender.HasTemplateSet should have comment or be unexported (golint)
    • macaron/router.go
    • Line 90: warning: exported function NewRouter should have comment or be unexported (golint)
    • Line 104: warning: exported type Params should have comment or be unexported (golint)
    • Line 191: warning: exported method Router.Group should have comment or be unexported (golint)
    • Line 343: warning: exported method ComboRouter.Get should have comment or be unexported (golint)
    • Line 350: warning: exported method ComboRouter.Patch should have comment or be unexported (golint)
    • Line 354: warning: exported method ComboRouter.Post should have comment or be unexported (golint)
    • Line 358: warning: exported method ComboRouter.Put should have comment or be unexported (golint)
    • Line 362: warning: exported method ComboRouter.Delete should have comment or be unexported (golint)
    • Line 366: warning: exported method ComboRouter.Options should have comment or be unexported (golint)
    • Line 370: warning: exported method ComboRouter.Head should have comment or be unexported (golint)
    • macaron/tree.go
    • Line 136: warning: exported function NewLeaf should have comment or be unexported (golint)
    • Line 182: warning: exported function NewSubtree should have comment or be unexported (golint)
    • Line 187: warning: exported function NewTree should have comment or be unexported (golint)
    • Line 258: warning: exported method Tree.Add should have comment or be unexported (golint)
    • Line 376: warning: exported method Tree.Match should have comment or be unexported (golint)
    • macaron/logger.go
    • Line 28: warning: exported var ColorLog should have comment or be unexported (golint)
    • Line 39: warning: exported method LoggerInvoker.Invoke should have comment or be unexported (golint)
    • macaron/macaron.go
    • Line 37: warning: exported function Version should have comment or be unexported (golint)
    • Line 177: warning: exported method Macaron.Before should have comment or be unexported (golint)
    • Line 223: warning: exported function GetDefaultListenInfo should have comment or be unexported (golint)
    • Line 274: warning: exported const DEV should have comment (or a comment on this block) or be unexported (golint)
    • Line 285: warning: comment on exported var Root should be of the form "Root ..." (golint)
    • Line 288: warning: comment on exported var FlashNow should be of the form "FlashNow ..." (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!


misspell65%

Misspell Finds commonly misspelled English words

    • macaron/render.go
    • Line 34: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 90: warning: "Addtional" is a misspelling of "Additional" (misspell)
    • macaron/tree_test.go
    • Line 75: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 76: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 84: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 86: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 102: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 104: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 112: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 114: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 238: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • macaron/context_test.go
    • Line 29: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 90: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 97: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 102: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 110: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 115: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 122: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 145: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 148: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 148: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 177: warning: "paramaters" is a misspelling of "parameters" (misspell)
    • Line 211: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 212: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 214: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 231: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 244: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 246: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 252: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • Line 273: warning: "Unknwon" is a misspelling of "Unknown" (misspell)
    • macaron/macaron.go
    • Line 29: warning: "unknwon" is a misspelling of "unknown" (misspell)
    • Line 43: warning: "fullfilled" is a misspelling of "fulfilled" (misspell)