Report for github.com/dbriemann/chesskimo

A    Great!    Found 14 issues across 19 files

Tweet

gofmt84%

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!


gocyclo100%

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.

No problems detected. Good job!


golint36%

Golint is a linter for Go source code.

    • chesskimo/board.go
    • Line 43: warning: exported const CHECK_NONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 60: warning: exported var SQUARE_DIFFS should have comment or be unexported (golint)
    • Line 146: warning: exported function NewBoard should have comment or be unexported (golint)
    • Line 557: warning: exported method Board.DetectChecksAndPins should have comment or be unexported (golint)
    • Line 646: warning: exported method Board.DetectSliderChecksAndPins should have comment or be unexported (golint)
    • Line 730: warning: exported method Board.GenerateAllLegalMoves should have comment or be unexported (golint)
    • Line 880: warning: if block ends with a return statement, so drop this else and outdent its block (golint)
    • Line 1196: warning: exported method Board.Perft should have comment or be unexported (golint)
    • Line 1222: warning: exported method Board.PerftDivide should have comment or be unexported (golint)
    • Line 1241: warning: exported method Board.InfoBoardString should have comment or be unexported (golint)
    • chesskimo/engine.go
    • Line 11: warning: exported const ENGINE_STATE_IDLE should have comment (or a comment on this block) or be unexported (golint)
    • Line 20: warning: exported type Engine should have comment or be unexported (golint)
    • Line 36: warning: exported function NewEngine should have comment or be unexported (golint)
    • Line 48: warning: exported method Engine.Run should have comment or be unexported (golint)
    • Line 59: warning: exported method Engine.NewGame should have comment or be unexported (golint)
    • Line 69: warning: exported method Engine.GetLegalMoves should have comment or be unexported (golint)
    • Line 75: warning: exported method Engine.MakeMove should have comment or be unexported (golint)
    • chesskimo/move.go
    • Line 4: warning: exported const EP_TYPE_NONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 13: warning: exported type Move should have comment or be unexported (golint)
    • Line 23: warning: exported function NewMove should have comment or be unexported (golint)
    • Line 35: warning: exported method Move.Mini should have comment or be unexported (golint)
    • chesskimo/piecelists.go
    • Line 12: warning: exported function NewPieceList should have comment or be unexported (golint)
    • Line 20: warning: exported method PieceList.Add should have comment or be unexported (golint)
    • Line 25: warning: exported method PieceList.Move should have comment or be unexported (golint)
    • Line 33: warning: exported method PieceList.Remove should have comment or be unexported (golint)
    • Line 41: warning: exported method PieceList.RemoveIdx should have comment or be unexported (golint)
    • Line 49: warning: exported method PieceList.Clear should have comment or be unexported (golint)
    • chesskimo/uci.go
    • Line 11: warning: exported type UCI should have comment or be unexported (golint)
    • Line 15: warning: exported method UCI.RunInputOutputLoop should have comment or be unexported (golint)
    • chesskimo/base.go
    • Line 3: warning: comment on exported type Piece should be of the form "Piece ..." (with optional leading article) (golint)
    • Line 6: warning: exported type Color should have comment or be unexported (golint)
    • Line 7: warning: exported type Square should have comment or be unexported (golint)
    • Line 8: warning: exported type Info should have comment or be unexported (golint)
    • Line 10: warning: exported type State should have comment or be unexported (golint)
    • Line 13: warning: comment on exported const NONE should be of the form "NONE ..." (golint)
    • Line 18: warning: exported const INFINITY should have comment (or a comment on this block) or be unexported (golint)
    • Line 22: warning: comment on exported const BLACK should be of the form "BLACK ..." (golint)
    • Line 32: warning: comment on exported const EMPTY should be of the form "EMPTY ..." (golint)
    • Line 45: warning: exported const GAMESTATE_ONGOING should have comment (or a comment on this block) or be unexported (golint)
    • Line 52: warning: comment on exported const BPAWN should be of the form "BPAWN ..." (golint)
    • Line 54: warning: exported const BKNIGHT should have comment (or a comment on this block) or be unexported (golint)
    • Line 68: warning: exported const UP should have comment (or a comment on this block) or be unexported (golint)
    • Line 79: warning: exported const INFO_NONE should have comment (or a comment on this block) or be unexported (golint)
    • Line 95: warning: exported method Info.Pinval should have comment or be unexported (golint)
    • Line 99: warning: exported method Info.IsSet should have comment or be unexported (golint)
    • Line 103: warning: exported method Info.Set should have comment or be unexported (golint)
    • Line 107: warning: exported method Info.Unset should have comment or be unexported (golint)
    • Line 112: warning: comment on exported var PAWN_PUSH_DIRS should be of the form "PAWN_PUSH_DIRS ..." (golint)
    • Line 114: warning: exported var PAWN_CAPTURE_DIRS should have comment or be unexported (golint)
    • Line 142: warning: exported var PrintMap should have comment or be unexported (golint)
    • Line 170: warning: exported method Color.Flip should have comment or be unexported (golint)
    • Line 175: warning: exported method Piece.PieceColor should have comment or be unexported (golint)
    • Line 179: warning: exported method Piece.HasColor should have comment or be unexported (golint)
    • Line 188: warning: exported method Piece.Overlaps should have comment or be unexported (golint)
    • Line 192: warning: exported method Piece.Contains should have comment or be unexported (golint)
    • Line 196: warning: exported method Square.IsEmpty should have comment or be unexported (golint)
    • Line 200: warning: exported method Square.OnBoard should have comment or be unexported (golint)
    • Line 204: warning: exported method Square.SquareColor should have comment or be unexported (golint)
    • Line 209: warning: exported method Square.Rank should have comment or be unexported (golint)
    • Line 213: warning: exported method Square.File should have comment or be unexported (golint)
    • Line 217: warning: exported method Square.IsPawnBaseRank should have comment or be unexported (golint)
    • Line 222: warning: exported method Square.IsPawnPromoting should have comment or be unexported (golint)
    • Line 227: warning: exported method Square.ToInfoIndex should have comment or be unexported (golint)
    • Line 231: warning: exported method Square.Diff should have comment or be unexported (golint)
    • Line 235: warning: exported method Square.CreatesEnPassent should have comment or be unexported (golint)
    • Line 246: warning: exported method Square.To0x88 should have comment or be unexported (golint)
    • Line 250: warning: exported method Square.To8x8 should have comment or be unexported (golint)
    • chesskimo/bitmove.go
    • Line 19: warning: exported const MOVE_FROM_SHIFT should have comment (or a comment on this block) or be unexported (golint)
    • Line 27: warning: exported function NewBitMove should have comment or be unexported (golint)
    • Line 31: warning: exported method BitMove.SetFeature should have comment or be unexported (golint)
    • Line 37: warning: exported method BitMove.From should have comment or be unexported (golint)
    • Line 42: warning: exported method BitMove.To should have comment or be unexported (golint)
    • Line 47: warning: exported method BitMove.PromotedPiece should have comment or be unexported (golint)
    • Line 52: warning: exported method BitMove.All should have comment or be unexported (golint)
    • Line 56: warning: exported method BitMove.MiniNotation should have comment or be unexported (golint)
    • chesskimo/movehistory.go
    • Line 6: warning: don't use underscores in Go names; const max_history_moves should be maxHistoryMoves (golint)
    • Line 9: warning: exported type MoveHistory should have comment or be unexported (golint)
    • Line 14: warning: exported method MoveHistory.Reset should have comment or be unexported (golint)
    • Line 18: warning: exported method MoveHistory.Put should have comment or be unexported (golint)
    • Line 24: warning: exported method MoveHistory.Get should have comment or be unexported (golint)
    • chesskimo/movelist.go
    • Line 7: warning: don't use underscores in Go names; const max_movelist_size should be maxMovelistSize (golint)
    • Line 10: warning: exported type MoveList should have comment or be unexported (golint)
    • Line 15: warning: exported method MoveList.Clear should have comment or be unexported (golint)
    • Line 19: warning: exported method MoveList.Put should have comment or be unexported (golint)
    • Line 24: warning: exported method MoveList.Get should have comment or be unexported (golint)

license100%

Checks whether your project has a LICENSE file.

No problems detected. Good job!


ineffassign89%

IneffAssign detects ineffectual assignments in Go code.


misspell100%

Misspell Finds commonly misspelled English words

No problems detected. Good job!