Skip to content

chore(linter): code cleanup #1

chore(linter): code cleanup

chore(linter): code cleanup #1

Triggered via pull request February 28, 2024 15:49
Status Failure
Total duration 36s
Artifacts

code-quality.yml

on: pull_request
code-quality
27s
code-quality
Fit to window
Zoom out
Zoom in

Annotations

10 errors and 11 warnings
code-quality: pkg/board/board.go#L7
Error return value of `b.ImportFEN` is not checked (errcheck)
code-quality: pkg/board/board.go#L11
Error return value of `b.ImportFEN` is not checked (errcheck)
code-quality: pkg/board/importExport.go#L206
Error return value of `os.WriteFile` is not checked (errcheck)
code-quality: pkg/pgn/bzip2.go#L33
Error return value is not checked (errcheck)
code-quality: cmd/texel-data/main.go#L68
Error return value of `writer.WriteString` is not checked (errcheck)
code-quality: pkg/board/bitboard.go#L193
assignOp: replace `attacked = attacked | SquareBitboards[sq]` with `attacked |= SquareBitboards[sq]` (gocritic)
code-quality: pkg/board/board.go#L40
assignOp: replace `b.CastlingRights = b.CastlingRights &^ BOOO` with `b.CastlingRights &^= BOOO` (gocritic)
code-quality: pkg/board/board.go#L47
assignOp: replace `b.CastlingRights = b.CastlingRights &^ BOOO` with `b.CastlingRights &^= BOOO` (gocritic)
code-quality: pkg/board/board.go#L41
assignOp: replace `b.CastlingRights = b.CastlingRights &^ BOO` with `b.CastlingRights &^= BOO` (gocritic)
code-quality: pkg/board/board.go#L49
assignOp: replace `b.CastlingRights = b.CastlingRights &^ BOO` with `b.CastlingRights &^= BOO` (gocritic)
code-quality
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/checkout@v3, actions/setup-go@v3, golangci/golangci-lint-action@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
code-quality: pkg/board/bitboard.go#L558
unused-parameter: parameter 'move' seems to be unused, consider removing or renaming it as _ (revive)
code-quality: pkg/board/move.go#L58
unused-parameter: parameter 'promo' seems to be unused, consider removing or renaming it as _ (revive)
code-quality: pkg/board/importExport.go#L321
increment-decrement: should replace piece += 1 with piece++ (revive)
code-quality: pkg/pgn/types.go#L50
exported: type name will be used as pgn.PGNParser by other packages, and that stutters; consider calling this Parser (revive)
code-quality: pkg/pgn/parser.go#L86
unused-parameter: parameter 'done' seems to be unused, consider removing or renaming it as _ (revive)
code-quality: pkg/pgn/source.go#L49
indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)
code-quality: pkg/pgn/source.go#L15
exported: type name will be used as pgn.PGNSource by other packages, and that stutters; consider calling this Source (revive)
code-quality: pkg/polyglot/polyglot.go#L40
exported: type name will be used as polyglot.PolyglotBook by other packages, and that stutters; consider calling this Book (revive)
code-quality: pkg/polyglot/polyglot.go#L15
blank-imports: a blank import should be only in a main or test package, or have a comment justifying it (revive)
code-quality: pkg/polyglot/polyglot.go#L152
indent-error-flow: if block ends with a return statement, so drop this else and outdent its block (revive)