Skip to content

Conversation

@goccy
Copy link
Owner

@goccy goccy commented Mar 16, 2025

fix #675

@codecov-commenter
Copy link

codecov-commenter commented Mar 16, 2025

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.85%. Comparing base (9671363) to head (4cfa363).

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #676   +/-   ##
=======================================
  Coverage   77.84%   77.85%           
=======================================
  Files          22       22           
  Lines        7959     7962    +3     
=======================================
+ Hits         6196     6199    +3     
  Misses       1350     1350           
  Partials      413      413           
🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
@goccy goccy requested a review from Copilot March 16, 2025 04:13
Copy link

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 PR fixes tab character handling so that when a tab is ignored, the column number is not incremented. Key changes include:

  • Adding new test cases in parser_test.go to verify correct handling of tab characters.
  • Introducing a new progressOnly function in scanner/scanner.go.
  • Replacing progressColumn calls with progressOnly in tab-related code paths in scanner/scanner.go to adjust column behavior.

Reviewed Changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
parser/parser_test.go New test cases for YAML content with tab characters to verify fix
scanner/scanner.go Adds progressOnly and updates scan logic to adjust tab character handling
Comments suppressed due to low confidence (2)

scanner/scanner.go:101

  • [nitpick] The function name 'progressOnly' is ambiguous—its purpose of selectively updating state (offset without affecting column) is not immediately clear. Consider adding a comment or choosing a more descriptive name to clarify its intent.
func (s *Scanner) progressOnly(ctx *Context, num int) {

scanner/scanner.go:1444

  • Replacing progressColumn with progressOnly should avoid incrementing the column number, however, since progressOnly still calls progress (which may update column-related state), please double-check that the column is not inadvertently incremented in these cases.
s.progressOnly(ctx, 1)
@goccy goccy merged commit 100fa23 into master Mar 16, 2025
20 checks passed
@goccy goccy deleted the fix-675 branch March 16, 2025 04:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants