Preparing report...

Report for github.com/linthan/echo/v4

(v4.0.2)

A+    Excellent!    Found 18 issues across 55 files

Tweet

gofmt83%

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!


gocyclo85%

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.

    • bind.go
    • Line 76: warning: cyclomatic complexity 19 of function (*DefaultBinder).bindData() is high (> 15) (gocyclo)
    • Line 150: warning: cyclomatic complexity 17 of function setWithProperType() is high (> 15) (gocyclo)
    • Line 31: warning: cyclomatic complexity 16 of function (*DefaultBinder).Bind() is high (> 15) (gocyclo)
    • context_test.go
    • Line 92: warning: cyclomatic complexity 19 of function TestContext() is high (> 15) (gocyclo)
    • router.go
    • Line 298: warning: cyclomatic complexity 25 of function (*Router).Find() is high (> 15) (gocyclo)

golint94%

Golint is a linter for Go source code.

    • codec/codec.go
    • Line 12: warning: exported type Codec should have comment or be unexported (golint)
    • Line 19: warning: exported type Encoder should have comment or be unexported (golint)
    • Line 23: warning: exported type Decoder should have comment or be unexported (golint)
    • Line 27: warning: exported type JSONCodec should have comment or be unexported (golint)
    • Line 32: warning: exported function NewJSONCodec should have comment or be unexported (golint)
    • Line 43: warning: exported method JSONCodec.Encode should have comment or be unexported (golint)
    • Line 51: warning: exported method JSONCodec.Decode should have comment or be unexported (golint)
    • Line 59: warning: exported type XMLCodec should have comment or be unexported (golint)
    • Line 62: warning: exported function NewXMLCodec should have comment or be unexported (golint)
    • Line 71: warning: exported method XMLCodec.Encode should have comment or be unexported (golint)
    • Line 76: warning: exported method XMLCodec.Decode should have comment or be unexported (golint)
    • Line 81: warning: exported type StringCodec should have comment or be unexported (golint)
    • Line 85: warning: exported function NewStringCodec should have comment or be unexported (golint)
    • Line 95: warning: exported method StringCodec.Encode should have comment or be unexported (golint)
    • Line 104: warning: exported method StringCodec.Decode should have comment or be unexported (golint)
    • Line 108: warning: comment on exported type ProtobufCodec should be of the form "ProtobufCodec ..." (with optional leading article) (golint)
    • Line 134: warning: exported function NewPBCodec should have comment or be unexported (golint)
    • Line 138: warning: exported method ProtobufCodec.Encode should have comment or be unexported (golint)
    • Line 141: warning: exported method ProtobufCodec.Decode should have comment or be unexported (golint)
    • Line 145: warning: exported type HTMLEncoder should have comment or be unexported (golint)
    • Line 150: warning: exported function NewHTMLEncoder should have comment or be unexported (golint)
    • Line 157: warning: exported method HTMLEncoder.Encode should have comment or be unexported (golint)
    • codec/option.go
    • Line 4: warning: exported type Options should have comment or be unexported (golint)
    • Line 10: warning: exported type Option should have comment or be unexported (golint)
    • Line 13: warning: exported function Indent should have comment or be unexported (golint)
    • Line 19: warning: exported function UseNumber should have comment or be unexported (golint)
    • Line 25: warning: exported function Format should have comment or be unexported (golint)
    • response.go
    • Line 83: warning: exported method Response.SetStatus should have comment or be unexported (golint)
    • Line 86: warning: exported method Response.SetData should have comment or be unexported (golint)
    • Line 90: warning: exported method Response.Data should have comment or be unexported (golint)
    • Line 94: warning: exported method Response.SetEncoder should have comment or be unexported (golint)
    • Line 98: warning: exported method Response.Encoder 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.

    • echo.go
    • Line 573: warning: ineffectual assignment to h (ineffassign)
    • Line 573: warning: ineffectual assignment to h (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!