Preparing report...

Report for github.com/YangYongZhi/muxy

A+    Excellent!    Found 19 issues across 51 files

Tweet

gofmt84%

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!


gocyclo96%

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.


golint80%

Golint is a linter for Go source code.

    • muxy/run/muxy.go
    • Line 37: warning: comment on exported method Muxy.MiddleWares should be of the form "MiddleWares ..." (golint)
    • muxy/throttler/pfctl.go
    • Line 51: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 57: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 65: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 84: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 90: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • Line 96: warning: should replace errors.New(fmt.Sprintf(...)) with fmt.Errorf(...) (golint)
    • muxy/throttler/tc.go
    • Line 40: warning: exported const TcList should have comment (or a comment on this block) or be unexported (golint)
    • muxy/api/http/stressng.go
    • Line 79: warning: if block ends with a return statement, so drop this else and outdent its block (move short variable declaration to its own line if necessary) (golint)
    • muxy/api/http/heartbeat.go
    • Line 17: warning: exported const Port should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: exported type HeartBeatSender should have comment or be unexported (golint)
    • Line 25: warning: exported type HeartBeats should have comment or be unexported (golint)
    • Line 34: warning: exported method HeartBeatSender.Start should have comment or be unexported (golint)
    • muxy/api/http/server.go
    • Line 16: warning: exported var Muxy should have comment or be unexported (golint)
    • Line 18: warning: exported type MuxyApiServer should have comment or be unexported (golint)
    • Line 23: warning: exported function New should have comment or be unexported (golint)
    • Line 27: warning: exported method MuxyApiServer.Start 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!


misspell98%

Misspell Finds commonly misspelled English words