Report for github.com/countstarlight/homo

A+    Excellent!    Found 17 issues across 22 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!


gocyclo90%

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.

    • homo/module/baidu/asr.go
    • Line 24: warning: comment on exported type ASRResponse should be of the form "ASRResponse ..." (with optional leading article) (golint)
    • Line 34: warning: comment on exported type ASRParams should be of the form "ASRParams ..." (with optional leading article) (golint)
    • Line 46: warning: exported type ASRParam should have comment or be unexported (golint)
    • Line 48: warning: exported function Format should have comment or be unexported (golint)
    • Line 58: warning: exported function Rate should have comment or be unexported (golint)
    • Line 67: warning: exported function Channel should have comment or be unexported (golint)
    • Line 73: warning: exported function Language should have comment or be unexported (golint)
    • Line 157: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 166: warning: comment on exported function SpeechToText should be of the form "SpeechToText ..." (golint)
    • homo/module/baidu/baidu.go
    • Line 25: warning: exported type Client should have comment or be unexported (golint)
    • Line 32: warning: exported type AuthResponse should have comment or be unexported (golint)
    • Line 43: warning: exported type DefaultAuthorizer should have comment or be unexported (golint)
    • Line 45: warning: exported method DefaultAuthorizer.Authorize should have comment or be unexported (golint)
    • Line 66: warning: exported method Client.Auth should have comment or be unexported (golint)
    • Line 77: warning: exported method Client.SetAuther should have comment or be unexported (golint)
    • Line 81: warning: exported function NewClient should have comment or be unexported (golint)
    • homo/cmd/interact/config/config.go
    • Line 17: warning: exported var BeepSpeakerInited should have comment or be unexported (golint)
    • Line 29: warning: exported function NewContext should have comment or be unexported (golint)
    • Line 37: warning: exported function Terminal should have comment or be unexported (golint)
    • homo/module/audio/portaudio.go
    • Line 30: warning: exported function PaError should have comment or be unexported (golint)
    • Line 34: warning: exported function PaErrorText should have comment or be unexported (golint)
    • Line 38: warning: exported function PaTerminate should have comment or be unexported (golint)
    • homo/cmd/webview/config/config.go
    • Line 26: warning: comment on exported var AppPath should be of the form "AppPath ..." (golint)
    • Line 28: warning: exported var LogPath should have comment or be unexported (golint)
    • Line 30: warning: comment on exported var DebugMode should be of the form "DebugMode ..." (golint)
    • Line 37: warning: comment on exported var Cfg should be of the form "Cfg ..." (golint)
    • Line 41: warning: comment on exported var RawDir should be of the form "RawDir ..." (golint)
    • Line 46: warning: comment on exported var HMMDirEn should be of the form "HMMDirEn ..." (golint)
    • Line 53: warning: comment on exported var ConversationAPI should be of the form "ConversationAPI ..." (golint)
    • Line 59: warning: comment on exported var BaiduASRAPI should be of the form "BaiduASRAPI ..." (golint)
    • Line 66: warning: comment on exported var TTSDir should be of the form "TTSDir ..." (golint)
    • Line 70: warning: comment on exported var IsPlayingVoice should be of the form "IsPlayingVoice ..." (golint)
    • Line 75: warning: comment on exported var VoicePlayMutex should be of the form "VoicePlayMutex ..." (golint)
    • Line 80: warning: comment on exported var RawToWav should be of the form "RawToWav ..." (golint)
    • Line 85: warning: exported const AppName should have comment (or a comment on this block) or be unexported (golint)
    • Line 127: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 216: warning: exported function UpdateConfigFile should have comment or be unexported (golint)
    • Line 262: warning: exported function Terminal should have comment or be unexported (golint)
    • homo/module/nlu/actions.go
    • Line 15: warning: exported var RunActions should have comment or be unexported (golint)
    • Line 72: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 84: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • homo/module/baidu/error.go
    • Line 12: warning: exported type ErrSpeechQuality should have comment or be unexported (golint)
    • Line 17: warning: comment on exported function IsErrSpeechQuality should be of the form "IsErrSpeechQuality ..." (golint)
    • homo/module/sphinx/sphinx.go
    • Line 34: warning: exported type Listener should have comment or be unexported (golint)
    • Line 40: warning: exported function LoadCMUSphinx should have comment or be unexported (golint)
    • Line 180: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 191: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • homo/module/view/view.go
    • Line 36: warning: exported function InitWebView should have comment or be unexported (golint)
    • Line 84: warning: exported type Message should have comment or be unexported (golint)
    • Line 87: warning: exported type HomoReply should have comment or be unexported (golint)
    • Line 91: warning: exported function TypingAnimate should have comment or be unexported (golint)
    • Line 100: warning: exported function TypingAnimateStop should have comment or be unexported (golint)
    • Line 109: warning: exported function SendInputText should have comment or be unexported (golint)
    • Line 118: warning: comment on exported function SendOnlyInputText should be of the form "SendOnlyInputText ..." (golint)
    • Line 128: warning: exported function SendReply should have comment or be unexported (golint)
    • Line 145: warning: exported function SendReplyWithVoice should have comment or be unexported (golint)
    • homo/module/baidu/tts.go
    • Line 82: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 89: warning: exported const B should have comment (or a comment on this block) or be unexported (golint)
    • Line 97: warning: exported type VoiceClient should have comment or be unexported (golint)
    • Line 101: warning: exported function NewVoiceClient should have comment or be unexported (golint)
    • Line 107: warning: comment on exported function TextToSpeech should be of the form "TextToSpeech ..." (golint)
    • homo/module/nlu/intent.go
    • Line 43: warning: exported type IntentRankingList should have comment or be unexported (golint)
    • Line 80: warning: exported function ActionLocal should have comment or be unexported (golint)
    • homo/module/audio/beep.go
    • Line 20: warning: exported var BeepSpeakerInited should have comment or be unexported (golint)
    • Line 26: warning: exported function BeepPlayMp3 should have comment or be unexported (golint)
    • Line 52: warning: exported function BeepPlayWav should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign95%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!