Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@CorentinGS
Copy link
Owner

WIP for #73

@codecov
Copy link

codecov bot commented Sep 25, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 69.42%. Comparing base (34f57bc) to head (fb28e4b).
⚠️ Report is 1 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CorentinGS CorentinGS marked this pull request as ready for review September 25, 2025 16:08
@CorentinGS CorentinGS requested a review from Copilot September 25, 2025 16:08
@CorentinGS CorentinGS linked an issue Sep 25, 2025 that may be closed by this pull request
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 DeambiguationSquare token 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.

{
name: "queen_with_full_square_disambiguation",
input: "Qe8f7",
expected: []TokenType{PIECE, DeambiguationSquare, SQUARE}, // This is likely wrong - should be PIECE, SQUARE (source), SQUARE (dest)
Copy link

Copilot AI Sep 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
expected: []TokenType{PIECE, DeambiguationSquare, SQUARE}, // This is likely wrong - should be PIECE, SQUARE (source), SQUARE (dest)
expected: []TokenType{PIECE, SQUARE, SQUARE},

Copilot uses AI. Check for mistakes.
@CorentinGS CorentinGS merged commit 362a897 into main Sep 25, 2025
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

PGN Parser Doesn't Handle Disambiguation Squares

2 participants