Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #75 +/- ##
==========================================
+ Coverage 68.51% 69.42% +0.90%
==========================================
Files 27 27
Lines 4872 4889 +17
==========================================
+ Hits 3338 3394 +56
+ Misses 1410 1371 -39
Partials 124 124 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes PGN disambiguation parsing by adding support for full square disambiguation in chess moves like "Qe8f7" (queen from e8 to f7). Currently, such moves fail to parse because the parser doesn't handle complete square disambiguation properly.
Key changes:
- Adds a new
DeambiguationSquaretoken type for lexical analysis - Implements parsing logic for full square disambiguation in moves
- Includes comprehensive test coverage for various disambiguation scenarios
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| pgn_disambiguation_test.go | Adds test cases for PGN disambiguation parsing and tokenizer functionality |
| pgn.go | Updates move parser to handle DeambiguationSquare tokens with origin file and rank extraction |
| lexer.go | Adds DeambiguationSquare token type and lexing logic for full square disambiguation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
pgn_disambiguation_test.go
Outdated
| { | ||
| name: "queen_with_full_square_disambiguation", | ||
| input: "Qe8f7", | ||
| expected: []TokenType{PIECE, DeambiguationSquare, SQUARE}, // This is likely wrong - should be PIECE, SQUARE (source), SQUARE (dest) |
There was a problem hiding this comment.
The comment indicates uncertainty about the expected token sequence. Either remove this comment if the expectation is correct, or fix the expected tokens if they are indeed wrong as the comment suggests.
| expected: []TokenType{PIECE, DeambiguationSquare, SQUARE}, // This is likely wrong - should be PIECE, SQUARE (source), SQUARE (dest) | |
| expected: []TokenType{PIECE, SQUARE, SQUARE}, |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
WIP for #73