Preparing report...

Report for github.com/polypmer/go-chess

A+    Excellent!    Found 9 issues across 13 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!


gocyclo69%

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.

    • go-chess/parse.go
    • Line 26: warning: cyclomatic complexity 99 of function (*Board).ParseMove() is high (> 15) (gocyclo)
    • go-chess/validation.go
    • Line 16: warning: cyclomatic complexity 42 of function (*Board).Move() is high (> 15) (gocyclo)
    • Line 168: warning: cyclomatic complexity 34 of function (*Board).updateBoard() is high (> 15) (gocyclo)
    • Line 634: warning: cyclomatic complexity 28 of function (*Board).validQueen() is high (> 15) (gocyclo)
    • Line 708: warning: cyclomatic complexity 26 of function (*Board).validKing() is high (> 15) (gocyclo)
    • Line 393: warning: cyclomatic complexity 23 of function (*Board).isInCheckDep() is high (> 15) (gocyclo)
    • Line 481: warning: cyclomatic complexity 20 of function (*Board).validPawn() is high (> 15) (gocyclo)
    • go-chess/search.go
    • Line 366: warning: cyclomatic complexity 41 of function (*Board).searchRook() is high (> 15) (gocyclo)
    • Line 241: warning: cyclomatic complexity 41 of function (*Board).searchBishop() is high (> 15) (gocyclo)
    • Line 734: warning: cyclomatic complexity 40 of function (*Board).SearchValidSlow() is high (> 15) (gocyclo)
    • Line 580: warning: cyclomatic complexity 34 of function (*Board).Tension() is high (> 15) (gocyclo)
    • Line 134: warning: cyclomatic complexity 27 of function (*Board).searchPawn() is high (> 15) (gocyclo)
    • Line 502: warning: cyclomatic complexity 25 of function (*Board).searchKing() is high (> 15) (gocyclo)
    • Line 13: warning: cyclomatic complexity 22 of function (*Board).SearchValidSlowly() is high (> 15) (gocyclo)
    • Line 76: warning: cyclomatic complexity 17 of function (*Board).SearchValid() is high (> 15) (gocyclo)
    • go-chess/evaluation.go
    • Line 125: warning: cyclomatic complexity 17 of function (*Board).Evaluate() is high (> 15) (gocyclo)
    • Line 81: warning: cyclomatic complexity 17 of function (*Board).queenThreaten() is high (> 15) (gocyclo)

golint61%

Golint is a linter for Go source code.

    • go-chess/minimax.go
    • Line 138: warning: comment on exported function MiniMaxPruning should be of the form "MiniMaxPruning ..." (golint)
    • Line 220: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 228: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 247: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 257: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 265: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 270: warning: comment on exported function MiniMax should be of the form "MiniMax ..." (golint)
    • Line 338: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • go-chess/minimax_test.go
    • Line 22: warning: don't use underscores in Go names; var state_prun should be statePrun (golint)
    • Line 23: warning: don't use underscores in Go names; var state_mini should be stateMini (golint)
    • go-chess/search.go
    • Line 10: warning: comment on exported method Board.SearchValidSlowly should be of the form "SearchValidSlowly ..." (golint)
    • Line 688: warning: exported method Board.TensionSum should have comment or be unexported (golint)
    • Line 733: warning: comment on exported method Board.SearchValidSlow should be of the form "SearchValidSlow ..." (golint)
    • go-chess/tables.go
    • Line 657: warning: comment on exported var PgnPattern should be of the form "PgnPattern ..." (golint)
    • Line 662: warning: exported var FenPattern should have comment or be unexported (golint)
    • Line 663: warning: comment on exported var PgnRowMap should be of the form "PgnRowMap ..." (golint)
    • go-chess/validation.go
    • Line 279: warning: exported method Board.GameOver should have comment or be unexported (golint)
    • Line 294: 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!


ineffassign84%

IneffAssign detects ineffectual assignments in Go code.

    • go-chess/ghess.go
    • Line 41: warning: ineffectual assignment to b (ineffassign)
    • Line 272: warning: ineffectual assignment to turn (ineffassign)
    • Line 274: warning: ineffectual assignment to turn (ineffassign)

misspell92%

Misspell Finds commonly misspelled English words