Preparing report...

Report for github.com/tuotoo/biu

A+    Excellent!    Found 11 issues across 24 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!


gocyclo91%

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.

    • biu/opt/route.go
    • Line 203: warning: cyclomatic complexity 35 of function setField() is high (> 15) (gocyclo)
    • Line 93: warning: cyclomatic complexity 25 of function RouteAPI() is high (> 15) (gocyclo)
    • biu/go-restful-helper.go
    • Line 38: warning: cyclomatic complexity 34 of function (WS).Route() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 21 of function addService() is high (> 15) (gocyclo)

golint54%

Golint is a linter for Go source code.

    • biu/internal/extras.go
    • Line 5: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 23: warning: exported function NewPathExpression should have comment or be unexported (golint)
    • Line 30: warning: exported function NameOfFunction should have comment or be unexported (golint)
    • Line 37: warning: exported function CamelToSnake should have comment or be unexported (golint)
    • biu/auth/auth.go
    • Line 11: warning: exported type Instance should have comment or be unexported (golint)
    • Line 17: warning: exported var DefaultInstance should have comment or be unexported (golint)
    • Line 40: warning: exported function JWTTimeout should have comment or be unexported (golint)
    • Line 44: warning: exported function JWTSecret should have comment or be unexported (golint)
    • Line 48: warning: exported function JWTRefreshTimeout should have comment or be unexported (golint)
    • biu/log/log.go
    • Line 11: warning: exported type ILogger should have comment or be unexported (golint)
    • Line 16: warning: exported type BiuInternalInfo should have comment or be unexported (golint)
    • Line 21: warning: exported type DefaultLogger should have comment or be unexported (golint)
    • Line 23: warning: exported method DefaultLogger.Info should have comment or be unexported (golint)
    • Line 35: warning: exported method DefaultLogger.Fatal should have comment or be unexported (golint)
    • biu/opt/run.go
    • Line 32: warning: exported function WithContext should have comment or be unexported (golint)
    • biu/container.go
    • Line 15: warning: exported var DefaultContainer should have comment or be unexported (golint)
    • Line 139: warning: exported method Container.Handle should have comment or be unexported (golint)
    • Line 143: warning: comment on exported method Container.FilterFunc should be of the form "FilterFunc ..." (golint)
    • biu/context.go
    • Line 18: warning: exported function HandleWithLogger should have comment or be unexported (golint)
    • Line 37: warning: exported function FilterWithLogger should have comment or be unexported (golint)
    • biu/opt/route.go
    • Line 19: warning: exported type FieldType should have comment or be unexported (golint)
    • Line 22: warning: exported const APITagName should have comment (or a comment on this block) or be unexported (golint)
    • Line 28: warning: exported const FieldUnknown should have comment (or a comment on this block) or be unexported (golint)
    • Line 56: warning: exported type ParamOpt should have comment or be unexported (golint)
    • Line 93: warning: exported function RouteAPI should have comment or be unexported (golint)
    • biu/box/ctx.go
    • Line 7: warning: a blank import should be only in a main or test package, or have a comment justifying it (golint)
    • Line 21: warning: exported const BiuAttrErr should have comment (or a comment on this block) or be unexported (golint)
    • Line 30: warning: exported const CtxSignature should have comment or be unexported (golint)
    • Line 57: warning: exported method Ctx.Transform should have comment or be unexported (golint)
    • Line 284: warning: exported method Ctx.Next should have comment or be unexported (golint)
    • biu/box/type.go
    • Line 13: warning: exported const FileSignature should have comment or be unexported (golint)
    • Line 15: warning: exported type File should have comment or be unexported (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!