Preparing report...

Report for github.com/revzim/nano

A+    Excellent!    Found 31 issues across 70 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.


golint61%

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/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/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/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/session/session.go
    • Line 65: warning: exported const UUIDDelim should have comment (or a comment on this block) or be unexported (golint)
    • Line 71: warning: comment on exported var UUIDGenKey should be of the form "UUIDGenKey ..." (golint)
    • Line 74: warning: exported var UUIDSecretGenerator should have comment or be unexported (golint)
    • Line 96: warning: comment on exported method Session.Router should be of the form "Router ..." (golint)
    • Line 160: warning: exported method Session.UUID should have comment or be unexported (golint)
    • Line 164: warning: exported method Session.ShortUUID should have comment or be unexported (golint)
    • nano/auth/jwt.go
    • Line 12: warning: exported type JWT should have comment or be unexported (golint)
    • Line 26: warning: exported function NewJWT should have comment or be unexported (golint)
    • nano/group.go
    • Line 75: warning: comment on exported method Group.GetMember should be of the form "GetMember ..." (golint)
    • Line 82: warning: comment on exported method Group.MemberUUID should be of the form "MemberUUID ..." (golint)
    • Line 122: warning: comment on exported method Group.MembersShortUUID should be of the form "MembersShortUUID ..." (golint)
    • Line 198: warning: comment on exported method Group.ContainsUUID should be of the form "ContainsUUID ..." (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/internal/env/env.go
    • Line 21: warning: package comment should be of the form "Package env ..." (golint)
    • Line 36: warning: exported var Wd should have comment or be unexported (golint)
    • Line 44: warning: comment on exported var TimerPrecision should be of the form "TimerPrecision ..." (golint)
    • Line 47: warning: comment on exported var GlobalTicker should be of the form "GlobalTicker ..." (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/examples/demo/chat2/client/main.go
    • Line 16: warning: exported const DefaultPomeloAddress should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported var PomeloAddress should have comment or be unexported (golint)
    • Line 26: warning: exported function InitPomeloClient should have comment or be unexported (golint)
    • nano/options.go
    • Line 18: warning: exported type Option should have comment or be unexported (golint)
    • Line 20: warning: exported function WithJWT should have comment or be unexported (golint)
    • Line 26: warning: exported function WithJWTOpts should have comment or be unexported (golint)
    • Line 32: warning: exported function WithPipeline should have comment or be unexported (golint)
    • Line 49: warning: comment on exported function WithClientAddr should be of the form "WithClientAddr ..." (golint)
    • Line 100: warning: comment on exported function WithDictionary should be of the form "WithDictionary ..." (golint)
    • Line 107: warning: exported function WithWSPath should have comment or be unexported (golint)
    • Line 113: warning: comment on exported function WithTimerPrecision should be of the form "WithTimerPrecision ..." (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/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/cluster/handler.go
    • Line 49: warning: exported const DefaultWSClientCloseMsg should have comment (or a comment on this block) or be unexported (golint)
    • Line 80: warning: exported type LocalHandler should have comment or be unexported (golint)
    • Line 91: 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/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 344: warning: exported method Node.HandleRequest should have comment or be unexported (golint)
    • Line 363: warning: exported method Node.HandleNotify should have comment or be unexported (golint)
    • Line 381: warning: exported method Node.HandlePush should have comment or be unexported (golint)
    • Line 389: warning: exported method Node.HandleResponse should have comment or be unexported (golint)
    • Line 397: warning: exported method Node.NewMember should have comment or be unexported (golint)
    • Line 403: warning: exported method Node.DelMember should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign97%

IneffAssign detects ineffectual assignments in Go code.

    • /home/shawn/mygo/src/github.com/gojp/goreportcard/_repos/src/github.com/revzim/nano/cluster/acceptor.go
    • Line 7: warning: no required module provides package github.com/revzim/nano/cluster/clusterpb; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/revzim/nano/cluster/clusterpb (invalid package name: "") (ineffassign)
    • Line 7: warning: no required module provides package github.com/revzim/nano/cluster/clusterpb; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/revzim/nano/cluster/clusterpb (invalid package name: "") (ineffassign)
    • Line 7: warning: no required module provides package github.com/revzim/nano/cluster/clusterpb; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/revzim/nano/cluster/clusterpb (invalid package name: "") (ineffassign)
    • Line 7: warning: no required module provides package github.com/revzim/nano/cluster/clusterpb; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/revzim/nano/cluster/clusterpb (invalid package name: "") (ineffassign)
    • Line 7: warning: no required module provides package github.com/revzim/nano/cluster/clusterpb; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/revzim/nano/cluster/clusterpb (invalid package name: "") (ineffassign)
    • Line 7: warning: no required module provides package github.com/revzim/nano/cluster/clusterpb; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/revzim/nano/cluster/clusterpb (invalid package name: "") (ineffassign)
    • Line 7: warning: no required module provides package github.com/revzim/nano/cluster/clusterpb; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/revzim/nano/cluster/clusterpb (invalid package name: "") (ineffassign)
    • nano/cluster/acceptor.go
    • Line 7: warning: no required module provides package github.com/revzim/nano/cluster/clusterpb; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/revzim/nano/cluster/clusterpb (invalid package name: "") (ineffassign)
    • Line 7: warning: no required module provides package github.com/revzim/nano/cluster/clusterpb; to add it: (ineffassign)
    • Line 7: warning: could not import github.com/revzim/nano/cluster/clusterpb (invalid package name: "") (ineffassign)

misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!