Preparing report...

Report for github.com/schollz/PIanoAI

B    Not bad!    Found 8 issues across 11 files

Tweet

gofmt54%

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!


gocyclo72%

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.

    • PIanoAI/ai/markov.go
    • Line 166: warning: cyclomatic complexity 37 of function (*AI).Learn() is high (> 15) (gocyclo)
    • Line 374: warning: cyclomatic complexity 17 of function (*AI).GenerateNote() is high (> 15) (gocyclo)
    • PIanoAI/ai2/ai.go
    • Line 94: warning: cyclomatic complexity 25 of function (*AI).Learn() is high (> 15) (gocyclo)
    • Line 186: warning: cyclomatic complexity 25 of function (*AI).Lick() is high (> 15) (gocyclo)

golint36%

Golint is a linter for Go source code.

    • PIanoAI/ai/nn2.go
    • Line 12: warning: comment on exported method AI.Learn3 should be of the form "Learn3 ..." (golint)
    • Line 56: warning: comment on exported method AI.Lick3 should be of the form "Lick3 ..." (golint)
    • PIanoAI/ai/nn3.go
    • Line 13: warning: comment on exported method AI.Learn4 should be of the form "Learn4 ..." (golint)
    • Line 65: warning: comment on exported method AI.Lick4 should be of the form "Lick4 ..." (golint)
    • PIanoAI/ai2/ai.go
    • Line 17: warning: exported type AI should have comment or be unexported (golint)
    • Line 53: warning: exported type Chord should have comment or be unexported (golint)
    • Line 60: warning: exported function New should have comment or be unexported (golint)
    • Line 94: warning: exported method AI.Learn should have comment or be unexported (golint)
    • PIanoAI/music/music.go
    • Line 26: warning: exported method Note.Name should have comment or be unexported (golint)
    • Line 61: warning: comment on exported function Open should be of the form "Open ..." (golint)
    • Line 136: warning: exported method Music.Save should have comment or be unexported (golint)
    • PIanoAI/ai/markov.go
    • Line 19: warning: comment on exported type AI should be of the form "AI ..." (with optional leading article) (golint)
    • Line 77: warning: exported function New should have comment or be unexported (golint)
    • Line 112: warning: exported method AI.Analyze should have comment or be unexported (golint)
    • Line 353: warning: exported function ConvertNotes should have comment or be unexported (golint)
    • Line 374: warning: exported method AI.GenerateNote should have comment or be unexported (golint)
    • Line 448: warning: exported type Pair should have comment or be unexported (golint)
    • Line 453: warning: exported type PairList should have comment or be unexported (golint)
    • PIanoAI/ai/nn.go
    • Line 15: warning: comment on exported method AI.Learn2 should be of the form "Learn2 ..." (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign81%

IneffAssign detects ineffectual assignments in Go code.


misspell90%

Misspell Finds commonly misspelled English words