Preparing report...

Report for github.com/lonng/nano

A+    Excellent!    Found 25 issues across 67 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!


gocyclo97%

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.


golint65%

Golint is a linter for Go source code.

    • nano/examples/cluster/master/topic_service.go
    • Line 13: warning: exported type User should have comment or be unexported (golint)
    • Line 22: warning: exported type TopicService should have comment or be unexported (golint)
    • Line 34: warning: exported type ExistsMembersResponse should have comment or be unexported (golint)
    • Line 38: warning: exported method TopicService.NewUser should have comment or be unexported (golint)
    • Line 71: warning: exported type UserBalanceResponse should have comment or be unexported (golint)
    • Line 75: warning: exported method TopicService.Stats should have comment or be unexported (golint)
    • nano/examples/cluster/protocol/rpc.go
    • Line 3: warning: exported type NewUserRequest should have comment or be unexported (golint)
    • Line 8: warning: exported type JoinRoomRequest should have comment or be unexported (golint)
    • Line 14: warning: exported type MasterStats should have comment or be unexported (golint)
    • nano/pipeline/pipeline.go
    • Line 14: warning: exported type Func should have comment or be unexported (golint)
    • Line 16: warning: exported type Pipeline should have comment or be unexported (golint)
    • Line 25: warning: exported type Channel should have comment or be unexported (golint)
    • Line 37: warning: exported function New should have comment or be unexported (golint)
    • nano/scheduler/scheduler.go
    • Line 43: warning: exported type Task should have comment or be unexported (golint)
    • Line 45: warning: exported type Hook should have comment or be unexported (golint)
    • Line 64: warning: exported function Sched should have comment or be unexported (golint)
    • Line 89: warning: exported function Close should have comment or be unexported (golint)
    • Line 98: warning: exported function PushTask should have comment or be unexported (golint)
    • nano/cluster/node.go
    • Line 75: warning: exported method Node.Startup should have comment or be unexported (golint)
    • Line 120: warning: exported method Node.Handler should have comment or be unexported (golint)
    • Line 189: warning: comment on exported method Node.Shutdown should be of the form "Shutdown ..." (golint)
    • Line 327: warning: exported method Node.HandleRequest should have comment or be unexported (golint)
    • Line 346: warning: exported method Node.HandleNotify should have comment or be unexported (golint)
    • Line 364: warning: exported method Node.HandlePush should have comment or be unexported (golint)
    • Line 372: warning: exported method Node.HandleResponse should have comment or be unexported (golint)
    • Line 380: warning: exported method Node.NewMember should have comment or be unexported (golint)
    • Line 386: warning: exported method Node.DelMember should have comment or be unexported (golint)
    • nano/examples/cluster/gate/gate_service.go
    • Line 10: warning: exported type BindService should have comment or be unexported (golint)
    • Line 20: warning: exported type LoginRequest should have comment or be unexported (golint)
    • Line 23: warning: exported type LoginResponse should have comment or be unexported (golint)
    • Line 28: warning: exported method BindService.Login should have comment or be unexported (golint)
    • Line 41: warning: exported method BindService.BindChatServer should have comment or be unexported (golint)
    • nano/internal/env/env.go
    • Line 21: warning: package comment should be of the form "Package env ..." (golint)
    • Line 35: warning: exported var Wd should have comment or be unexported (golint)
    • Line 43: warning: comment on exported var TimerPrecision should be of the form "TimerPrecision ..." (golint)
    • Line 46: warning: comment on exported var GlobalTicker should be of the form "GlobalTicker ..." (golint)
    • nano/cluster/handler.go
    • Line 76: warning: exported type LocalHandler should have comment or be unexported (golint)
    • Line 87: warning: exported function NewHandler should have comment or be unexported (golint)
    • Line 158: warning: exported method LocalHandler.LocalService should have comment or be unexported (golint)
    • Line 167: warning: exported method LocalHandler.RemoteService should have comment or be unexported (golint)
    • nano/examples/cluster/chat/chat_service.go
    • Line 14: warning: exported type RoomService should have comment or be unexported (golint)
    • Line 25: warning: exported method RoomService.JoinRoom should have comment or be unexported (golint)
    • Line 39: warning: exported type SyncMessage should have comment or be unexported (golint)
    • Line 44: warning: exported method RoomService.SyncMessage should have comment or be unexported (golint)
    • nano/component/hub.go
    • Line 23: warning: exported type CompWithOptions should have comment or be unexported (golint)
    • Line 28: warning: exported type Components should have comment or be unexported (golint)
    • nano/cluster/member.go
    • Line 25: warning: exported type Member should have comment or be unexported (golint)
    • Line 30: warning: exported method Member.MemberInfo should have comment or be unexported (golint)
    • nano/options.go
    • Line 17: warning: exported type Option should have comment or be unexported (golint)
    • Line 19: warning: exported function WithPipeline should have comment or be unexported (golint)
    • Line 36: warning: comment on exported function WithClientAddr should be of the form "WithClientAddr ..." (golint)
    • Line 87: warning: comment on exported function WithDictionary should be of the form "WithDictionary ..." (golint)
    • Line 94: warning: exported function WithWSPath should have comment or be unexported (golint)
    • Line 100: warning: comment on exported function WithTimerPrecision should be of the form "WithTimerPrecision ..." (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!