Preparing report...

Report for github.com/evanphx/alexa

(v0.0.0-20160308055714-8e561f8aee6a)

B    Not bad!    Found 10 issues across 10 files

Tweet

gofmt90%

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!


gocyclo70%

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.

    • alexa/ears.go
    • Line 15: warning: cyclomatic complexity 18 of function ListenIntoBuffer() is high (> 15) (gocyclo)
    • alexa/ask.go
    • Line 138: warning: cyclomatic complexity 16 of function Listen() is high (> 15) (gocyclo)

golint10%

Golint is a linter for Go source code.

    • alexa/portaudio/portaudio.go
    • Line 1: warning: package comment should be of the form "Package portaudio ..." (golint)
    • Line 29: warning: exported function Version should have comment or be unexported (golint)
    • Line 33: warning: exported function VersionText should have comment or be unexported (golint)
    • Line 37: warning: exported type Error should have comment or be unexported (golint)
    • Line 44: warning: exported const NotInitialized should have comment (or a comment on this block) or be unexported (golint)
    • Line 74: warning: exported type UnanticipatedHostError should have comment or be unexported (golint)
    • Line 101: warning: exported function Initialize should have comment or be unexported (golint)
    • Line 110: warning: exported function Terminate should have comment or be unexported (golint)
    • Line 123: warning: exported type HostApiType should have comment or be unexported (golint)
    • Line 147: warning: exported const InDevelopment should have comment (or a comment on this block) or be unexported (golint)
    • Line 163: warning: exported type HostApiInfo should have comment or be unexported (golint)
    • Line 171: warning: exported type DeviceInfo should have comment or be unexported (golint)
    • Line 184: warning: exported function HostApis should have comment or be unexported (golint)
    • Line 192: warning: exported function HostApi should have comment or be unexported (golint)
    • Line 204: warning: exported function DefaultHostApi should have comment or be unexported (golint)
    • Line 216: warning: exported function Devices should have comment or be unexported (golint)
    • Line 224: warning: exported function DefaultInputDevice should have comment or be unexported (golint)
    • Line 236: warning: exported function DefaultOutputDevice should have comment or be unexported (golint)
    • Line 344: warning: exported const FramesPerBufferUnspecified should have comment or be unexported (golint)
    • Line 346: warning: exported type StreamFlags should have comment or be unexported (golint)
    • Line 349: warning: exported const NoFlag should have comment (or a comment on this block) or be unexported (golint)
    • Line 357: warning: comment on exported function HighLatencyParameters should be of the form "HighLatencyParameters ..." (golint)
    • Line 389: warning: comment on exported function LowLatencyParameters should be of the form "LowLatencyParameters ..." (golint)
    • Line 421: warning: comment on exported function IsFormatSupported should be of the form "IsFormatSupported ..." (golint)
    • Line 434: warning: exported type Int24 should have comment or be unexported (golint)
    • Line 436: warning: exported type Stream should have comment or be unexported (golint)
    • Line 448: warning: comment on exported type StreamCallback should be of the form "StreamCallback ..." (with optional leading article) (golint)
    • Line 459: warning: comment on exported type Buffer should be of the form "Buffer ..." (with optional leading article) (golint)
    • Line 473: warning: exported type StreamCallbackTimeInfo should have comment or be unexported (golint)
    • Line 477: warning: exported type StreamCallbackFlags should have comment or be unexported (golint)
    • Line 480: warning: exported const InputUnderflow should have comment (or a comment on this block) or be unexported (golint)
    • Line 487: warning: comment on exported function OpenStream should be of the form "OpenStream ..." (golint)
    • Line 516: warning: comment on exported function OpenDefaultStream should be of the form "OpenDefaultStream ..." (golint)
    • Line 713: warning: exported method Stream.Close should have comment or be unexported (golint)
    • Line 722: warning: exported method Stream.Start should have comment or be unexported (golint)
    • Line 774: warning: exported method Stream.Stop should have comment or be unexported (golint)
    • Line 778: warning: exported method Stream.Abort should have comment or be unexported (golint)
    • Line 782: warning: exported method Stream.Info should have comment or be unexported (golint)
    • Line 790: warning: exported type StreamInfo should have comment or be unexported (golint)
    • Line 795: warning: exported method Stream.Time should have comment or be unexported (golint)
    • Line 799: warning: exported method Stream.CpuLoad should have comment or be unexported (golint)
    • Line 803: warning: exported method Stream.AvailableToRead should have comment or be unexported (golint)
    • Line 811: warning: exported method Stream.AvailableToWrite should have comment or be unexported (golint)
    • Line 860: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 891: warning: exported method StreamCMap.Get should have comment or be unexported (golint)
    • Line 901: warning: exported method StreamCMap.Track should have comment or be unexported (golint)
    • Line 910: warning: exported method StreamCMap.Untrack should have comment or be unexported (golint)
    • alexa/audio.go
    • Line 9: warning: exported type AudioCommand should have comment or be unexported (golint)
    • Line 12: warning: exported method AudioCommand.Execute should have comment or be unexported (golint)
    • alexa/osx.go
    • Line 8: warning: exported function OSXMuted should have comment or be unexported (golint)
    • Line 18: warning: exported function OSXMute should have comment or be unexported (golint)
    • Line 23: warning: exported function OSXUnmute should have comment or be unexported (golint)
    • alexa/setup.go
    • Line 16: warning: exported type SetupCommand should have comment or be unexported (golint)
    • Line 124: warning: exported method SetupCommand.Execute should have comment or be unexported (golint)
    • alexa/vad.go
    • Line 12: warning: exported type VAD should have comment or be unexported (golint)
    • Line 19: warning: exported function NewVAD should have comment or be unexported (golint)
    • Line 27: warning: comment on exported method VAD.Flux should be of the form "Flux ..." (golint)
    • Line 37: warning: should omit 2nd value from range; this loop is equivalent to `for i := range ...` (golint)
    • alexa/config/config.go
    • Line 14: warning: exported type Config should have comment or be unexported (golint)
    • Line 23: warning: exported function LoadConfig should have comment or be unexported (golint)
    • Line 43: warning: exported function WriteConfig should have comment or be unexported (golint)
    • Line 56: warning: exported function GetToken should have comment or be unexported (golint)
    • alexa/ask.go
    • Line 18: warning: exported const DefaultQuietFrames should have comment or be unexported (golint)
    • Line 96: warning: exported type AskCommand should have comment or be unexported (golint)
    • Line 99: warning: exported type State should have comment or be unexported (golint)
    • Line 102: warning: exported const Waiting should have comment (or a comment on this block) or be unexported (golint)
    • Line 107: warning: exported method AskCommand.Execute should have comment or be unexported (golint)
    • Line 133: warning: exported type ListenOpts should have comment or be unexported (golint)
    • Line 138: warning: exported function Listen should have comment or be unexported (golint)
    • alexa/ears.go
    • Line 13: warning: exported const DefaultQuietTime should have comment or be unexported (golint)
    • Line 15: warning: exported function ListenIntoBuffer should have comment or be unexported (golint)
    • alexa/globals.go
    • Line 3: warning: exported type GlobalOptions should have comment or be unexported (golint)
    • Line 6: warning: exported var Globals should have comment or be unexported (golint)

license0%

Checks whether your project has a LICENSE file.


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!