Preparing report...

Report for github.com/zhouziqunzzq/MiraiGo-DD

A    Great!    Found 28 issues across 36 files

Tweet

gofmt88%

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!


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.


golint27%

Golint is a linter for Go source code.

    • MiraiGo-DD/modules/bili/bili_user_info_rsp.go
    • Line 4: warning: comment on exported const NotStreaming should be of the form "NotStreaming ..." (golint)
    • Line 6: warning: exported const Streaming should have comment (or a comment on this block) or be unexported (golint)
    • Line 9: warning: exported type UserInfoRsp should have comment or be unexported (golint)
    • Line 16: warning: exported type UserInfo should have comment or be unexported (golint)
    • Line 28: warning: exported type LiveRoom should have comment or be unexported (golint)
    • MiraiGo-DD/modules/bili/bili_live_msg_fetcher_types.go
    • Line 14: warning: exported const HeaderLen should have comment (or a comment on this block) or be unexported (golint)
    • Line 34: warning: exported type LiveMsgPacket should have comment or be unexported (golint)
    • Line 43: warning: exported method LiveMsgPacket.ToBytes should have comment or be unexported (golint)
    • Line 65: warning: exported method LiveMsgPacket.FromBytes should have comment or be unexported (golint)
    • Line 89: warning: exported method LiveMsgPacket.DecodeBodyAsViewCnt should have comment or be unexported (golint)
    • Line 101: warning: exported method LiveMsgPacket.DecodeBodyAsNotificationRawJson should have comment or be unexported (golint)
    • Line 145: warning: exported type DecodedLiveMsg should have comment or be unexported (golint)
    • Line 152: warning: exported type JoinRequestBody should have comment or be unexported (golint)
    • Line 161: warning: exported type NotificationBody should have comment or be unexported (golint)
    • Line 167: warning: exported method NotificationBody.ParseAsDanmu should have comment or be unexported (golint)
    • MiraiGo-DD/modules/naive_chatbot/chatbot_imlp.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 20: warning: exported const GrpcTimeout should have comment (or a comment on this block) or be unexported (golint)
    • Line 32: warning: exported function NewChatbot should have comment or be unexported (golint)
    • Line 135: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 149: 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)
    • MiraiGo-DD/modules/shell/parsed_cmd.go
    • Line 7: warning: exported type ParsedCmd should have comment or be unexported (golint)
    • Line 13: warning: exported function NewParsedCmd should have comment or be unexported (golint)
    • Line 21: warning: exported method ParsedCmd.AppendArg should have comment or be unexported (golint)
    • MiraiGo-DD/modules/naive_chatbot/chatbot_api.go
    • Line 1: warning: don't use an underscore in package name (golint)
    • Line 8: warning: exported function GetTriggerProb should have comment or be unexported (golint)
    • Line 14: 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)
    • Line 19: warning: exported function SetTriggerProb should have comment or be unexported (golint)
    • Line 28: 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)
    • MiraiGo-DD/modules/bili/bili_event.go
    • Line 4: warning: exported const StartLive should have comment (or a comment on this block) or be unexported (golint)
    • Line 9: warning: exported type Event should have comment or be unexported (golint)
    • Line 14: warning: exported function NewEvent should have comment or be unexported (golint)
    • Line 21: warning: exported type DanmuEventData should have comment or be unexported (golint)
    • MiraiGo-DD/modules/bili/bili_impl.go
    • Line 31: warning: exported function NewBili should have comment or be unexported (golint)
    • Line 225: warning: should omit 2nd value from range; this loop is equivalent to `for uid := range ...` (golint)
    • Line 312: 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)
    • MiraiGo-DD/modules/bili/bili_live_msg_fetcher.go
    • Line 13: warning: exported const BiliLiveMsgApi should have comment (or a comment on this block) or be unexported (golint)
    • Line 18: warning: exported type LiveMsgFetcher should have comment or be unexported (golint)
    • Line 31: warning: exported function NewLiveMsgFetcher should have comment or be unexported (golint)
    • Line 44: warning: exported method LiveMsgFetcher.Init should have comment or be unexported (golint)
    • Line 67: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 74: warning: exported method LiveMsgFetcher.Run should have comment or be unexported (golint)
    • Line 78: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 168: warning: exported method LiveMsgFetcher.Stop should have comment or be unexported (golint)
    • Line 238: warning: if block ends with a return statement, so drop this else and outdent its block (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!